Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Setting ThousandSeparator and DecimalSeparator breaks TppPDFDevice?

edited June 2012 in General
Hi,

I set this at the start of my Delphi project:

ThousandSeparator := '.';
DecimalSeparator := ',';

I try to print my report to multiple devices using TppPDFDevice (like in this rbWiki article: http://www.digital-metaphors.com:8080/Output/Printer/How_To...Print_to_the_Printer_and_File_Device ).

The resulting PDF file is broken.

Since the TppPDFDevice has to output the correct format it shouldn't rely on DecimalSeparator (which I think is causing the trouble here).

Correct me, if I'm doing something wrong :).

I'm using RB 14.05 on Delphi 2009.

PS: IIRC the same can also happen when the user sets their separators in the locale settings in the Windows control panel.

--
Regards
Jens

Comments

  • edited June 2012
    Hi Jens,

    Starting with RB 12, it is necessary to also set the internal
    ppFormatSettings property when you set the global Delphi FormatSettings.
    This is necessary to support numerous versions of Delphi.

    Example:

    FormatSettings.DecimalSeparator := ',';
    ...
    ppFormatSettings := FormatSettings;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2012
    Hello Nico,

    that works as expected, thanks.

    In case someone has the same problem, ppFormatSettings is defined in the 'ppUtils' unit.

    Am 18.06.2012 14:59, schrieb Nico Cizik (Digital Metaphors):
This discussion has been closed.