Specify Data Formatting
- 2 min to read
This tutorial demonstrates how to specify value formatting for report elements. In particular, it shows how to format numeric values as a currency, apply a percent format and display date/time values in one of the standard forms.
Format Numeric Values
Locate a control bound to a price field (Unit Price, Extended Price or another one) and switch to the Properties panel. Expand the Actions category and click the Text Format String property's ellipsis button.
The invoked FormatString Editor contains numerous built-in formatting presets grouped by categories. Switch to the Currency category and select a required format pattern to display field values as currency amounts. The editor allows you to see the preview of the selected format in the Preview section.
You can manually create a format if it does not exist in the list by entering the format string in the dedicated editor and clicking Add.
Select a control bound to a field, whose values should be displayed as percents (the Discount field in this example), and invoke the FormatString Editor for it. Choose a format item under the Percent category to apply percent format to this control. In this case, field values are multiplied by 100 and displayed with a percent symbol.
Format Date-Time Values
Select a date-time field (OrderDate, RequiredDate or ShippedDate), invoke the FormatString Editor and choose one of the standard formats in the DateTime category. For instance, display the date string as the full name of the month followed by the number of the day and a four digit year.
View the Result
Click the Preview toolbar button to see the result.