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

Export to RTF

edited December 2006 in General
Hi,

I'm Trying the following code to export output to RTF:


with ThisReport do
begin
TextFileName := s + '.rtf';
OutlineSettings.Enabled := false;
AllowPrintToFile := true;
ShowPrintDialog := false;
ShowCancelDialog := false;
DeviceType := 'RTFFile';
Print;
ShowMessage('RTF file created: ' + s + '.rtf');
end;

But then I get some gibberish in the rtf file.


Regards,

Nols Smit

Comments

  • edited December 2006
    Hi Nols,

    Which third party export device are you using to export to RTF? You may
    want to try contacting them directly for a quicker response.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2006
    I'm not using any third-party software. I'm using the build-in capabilities
    of RB 10.3. For example, if I create HTML output (DeviceType := 'XHTML';),
    I include rsXHTMLDevice. I found my images download at least 10x faster
    than when I used Pragnaan's Export devices.

    I than saw DeviceType may be also RTFFile. But if I use that, I get
    gibberish in the file created.

    Nols Smit


  • edited December 2006
    Hi Nols,

    ReportBuilder does not have native RTF export. You most likely still have
    the Pragnaan package installed or one of its files included in your uses
    clause. Currently ReportBuilder 10 is capable of exporting to Archive
    (.raf), Delimited Text, Report Emulation Text, PDF, and XHTML (server only).

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2006
    OK, I understand, but then for what usage do one set the: DeviceType :=
    'RTFFile';

    Nols Smit

  • edited December 2006
    Hi Nols,

    ReportBuilder offers an open architecture enabling other companies or
    individuals to easily add export devices. At design time, these devices are
    registered using the Component registration in the Delphi IDE. At runtime,
    they are registered if the device file is included in the uses clause of
    your application. The reason you are seeing "RTFFile" in the device list is
    probably due to one of these reasons. I'm guessing that Pragnaan (or any
    other device suite you are using) calls their RTF export device by this
    name.

    If you are getting improper output from this device, you should contact
    their support and find out if there is a fix or update to resolve the
    problem.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.