ActiveReports 8
Date, Time, and Number Formatting

In Section Reports, you can set formatting strings for date, time, currency, and other numeric values using the OutputFormat property on the TextBox control. The OutputFormat dialog also allows you to select international currency values and select from various built-in string expressions. In addition to the built-in string expressions, you may use any .NET standard formatting strings. You can find information about these strings (Numerics and Date/Time formats) on MSDN.

Note: The ReportInfo control has many preformatted options in the FormatString property for RunDateTime and Page Numbers. For more information, see Display Page Numbers and Report Dates.

  • The format from the OutputFormat property is applied to the value set in the DataField property of the Value property. It is not applied when a string is set in the Text property.
  • OutputFormat property settings are valid only for Double or DateTime type values. In case of a String or when no data type is set, the format is automatically applied to only those values that can be converted to Double or DateTime, otherwise no format is applied.

The OutputFormat property allows four sections delimited by a semicolon. Each section contains the format specifications for a different type of number:

For example: $#,#00.00; ($#,#00.00_); $0.00; #



Currency and numbers:

Note: Underscore (_) keycode can be used in OutputFormat property to skip the width of the next character. This code is commonly used as _) to leave space for a closing parenthesis in a positive number format when the negative number format includes parentheses. This allows both positive and negative values to line up at the decimal point.
See Also

How To

Support Forum