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

Print to file problem

edited August 2002 in General
I'm currently writing an application that will produce a report to printer,
to screen and to text file.
The procedure that write to screen and to file functions correctly, but that
for text file seems always produce blank reports. Here are part of my source
code. Did I miss something?

procedure TForm6.btPrintToFileClick(Sender: TObject);
var
yy, mm, dd: word;
begin
decodedate(now, yy, mm, dd);
SaveDialog1.FileName := IntToStr(mm) + IntToStr(dd) + IntToStr(yy) +
'.txt';
if SaveDialog1.Execute then
begin
rpt.TextFileName := SaveDialog1.FileName;
rpt.DeviceType := dtTextFile;
// some initialization here
rpt.print;
end;
end;

rpt is the TppReport to save. Thank you for any suggestions. :)

Comments

This discussion has been closed.