Currency Formatting

Currently when formatting currency display formats, ReportBuilder internally calls FloatToStrF with a ffCurrency paramter.

This honors the Windows currency settings.

There are two ways to override this behavior:

Create a Descendant of TppDisplayFormat

See ppDisplayFormat.pas. You can easily create a descendant of TppDisplayFormat and specify that your TmyDisplayFormat be used by ReportBuilder to perform formatting. See the initialization section ppDisplayFormat.pas.

Override the Window Currency Values

You can override this by setting Delphi’s global variables for DecimalSeparator and CurrencyString. You will probably want to restore these values after printing the report.

Below is a simple example:

For the end-user solution you may to code an event-handler for the Report.Template.OnLoadEnd event to setup the proper settings.