ActiveReports 6 Online Help
Date, Time, and Number Formatting

ActiveReports allows you to 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 for RunDateTime and Page Numbers. For more information, see ActiveReports Toolbox Controls.

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

Below is the example of how to set the OutputFormat property.

To write code in Visual Basic.NET

To write code in C#

Underscore support

You can use the underscore character in the OutputFormat property to add the white space after the character specified in the Value property. For example, using the underscore character adds the white space for a closing parenthesis in a positive number format while the negative number format includes parentheses. This way both positive and negative values are lined up at the decimal point.

Below is the example of how to set the OutputFormat property with the underscore character.

To write code in Visual Basic.NET

To write code in C#

Using the underscore character in the OutputFormat property does not take effect in the combination with the following properties.

  • The RightToLeft property is set to True.
  • The VerticalText property is set to True.
  • The Alignment property is set to Justify.
  • The TextJustify property is set to DistributeAllLines

    Times:

    Dates:

    Currency and numbers:

  • See Also

    How To