Format String Editor
- 2 minutes to read
The Format String Editor provides you with the capability to apply required formatting to report elements to display their incoming data. This formatting allows you to easily select one of the built-in formats or create your own. For instance, you can format a numeric value as currency, display a date/time value in one of the standard forms depending on culture, etc.
Use Standard Formats
The Format String Editor contains numerous built-in formatting presets grouped by categories.
All categories are displayed in the Category list on the left side. The Types list on the right side contains formats available within the selected category. The editor also allows you to see the preview of the selected format in the Preview section.
Use General Formats
In the General category, you can enter the Prefix and Suffix specifying custom text that will be added before and after the output value, respectively.
Create Custom Formats
To create a custom format item, enter the format string in the dedicated editor and click Add. The format will be added to the end of the Types list and automatically selected.
You can then remove a custom format string by clicking the corresponding button.
You can use the IFormatStringStorage service to add a custom format item to the DateTime category at runtime.
Run the Format String Editor
You can invoke the Format String Editor to format values of a control’s bindable properties (not the control’s static content) and summary values.
A common task is to format an XRLabel‘s XRControl.Text property. To do this, expand the Actions or Data category, and in the Data Binding section, click the ellipsis button for the XRBinding.FormatString property.
Similarly, you can apply formatting to XRControl.NavigateUrl (for example, to add the https:// prefix to the link’s contents), XRControl.Tag and XRControl.Bookmark properties.