How to print to a comma-dilimited text file
Hello,
How do I print a report to a comma delimited text file using ReportBuilder
(not TExtraDevice)? I wrote a bare bone application with only a simple
report, then I tried the following code but it only printed an empty file:
ppReport1.AllowPrintToFile := True;
ppReport1.DeviceType := 'TextFile';
ppReport1.TextFileName := 'C:\temp\test.txt';
ppReport1.TextFileType := ftComma;
ppReport1.Print;
When I changed the DeviceType to 'Screen' and the report looks just fine.
What else do I need to do? I have Delphi 7 and RB v7.01.
Thank you.
Bill
How do I print a report to a comma delimited text file using ReportBuilder
(not TExtraDevice)? I wrote a bare bone application with only a simple
report, then I tried the following code but it only printed an empty file:
ppReport1.AllowPrintToFile := True;
ppReport1.DeviceType := 'TextFile';
ppReport1.TextFileName := 'C:\temp\test.txt';
ppReport1.TextFileType := ftComma;
ppReport1.Print;
When I changed the DeviceType to 'Screen' and the report looks just fine.
What else do I need to do? I have Delphi 7 and RB v7.01.
Thank you.
Bill
This discussion has been closed.
Comments
From the designer file menu, select Print To File Setup... and bring up the
Print To File dialog. From there you can select which text object are to be
included in your comma delimited text file. This can be manually controlled
using the Save, SaveLength, and SaveOrder properties of each text object on
your report.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com