Home General

Textfiledevice and Encoding

edited January 2012 in General
Hello,

I'm using RB14.2 with DelhpiXE2 Update 3.

Is there a possibility to change in a report the encoding (from utf8 to
ansi) for the DeviceType "TppTextFileDevice"?

Thanks for your help!

Yours,
Michael Schustereder

Comments

  • edited January 2012

    The TppTextFileDevice.Encoding property can be used control the encoding.
    This is a public property. Use the Report.OnFileDeviceCreate event - here
    is an example.

    uses
    ppFilDev;

    procedure TForm1.ppReport1FileDeviceCreate(Sender: TObject);
    begin
    if (ppReport1.FileDevice is TppTextFileDevice) then
    TppTextFileDevice(ppReport1.FileDevice.Encoding := TEncoding.ASCII;

    end;


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.