How to Format Date Labels in the Chart Category Axis in Bold Reports
Learn how to format date labels on a chart’s category axis in Bold Reports to improve readability and match reporting requirements. This guide explains how report designers can customize date formats using the Properties Panel or Expressions.
Step-by-Step Instructions
Method 1: Using the Properties Panel
This method applies standard date formats directly to the chart axis labels.
-
Open the report in the Bold Reports Web Designer.
-
Select the Chart component (such as Bar, Column, or Line chart) to activate its settings.
-
In the Properties Panel, scroll down to locate the Category Axis section.
-
Expand the Label settings under the Category Axis.
-
In the Format field, choose one of the following options:
- Option A (Manual Entry): Enter a custom date format string directly, such as:
MM/dd/yyyy,dd-MMM-yyyy, oryyyy-MM.
- Option B (Format Dialog): Click the ellipsis (…) icon, set the Type to Date, select your preferred format, and click OK.
- Option A (Manual Entry): Enter a custom date format string directly, such as:
Note: To ensure the Properties panel format is applied, the label field must contain only the raw field value without any pre-existing expressions.
Method 2: Using Expressions
Use this method if you need complex logic or specific string manipulation for your date labels.
-
Navigate to the Data Panel and locate the date column assigned to your chart.
-
Click the Settings (gear) icon next to the column name and select Groups.
-
In the Grouping dialog, enable the Label option.
-
Click Expression to open the Expression Editor.
-
Enter the formatting expression (e.g.,
=Format(CDate(Fields!YourDateField.Value), "dd/MM/yyyy")). -
Ensure the Group By field is set to the required date field and click OK.
-
Click Preview in the top toolbar to verify the formatted labels.
Code Samples
Minimal Expression Example
Use the following expression for basic date formatting in the Expression Editor.
Tested on Bold Reports 7.1
=Format(CDate(Fields!OrderDate.Value), "MM/dd/yyyy")
Full Context Example
If the data source returns date values as strings, use CDate to ensure the Format function interprets them correctly.
// Example for a field named 'ShipDate'
// Returns: 27-Oct-2025
=Format(CDate(Fields!ShipDate.Value), "dd-MMM-yyyy")