If you set the Report.AllowPrintToFile property to True and assign the Report.DeviceType to a file device such as "TextFile", the PrintDialog will already have the PrintToFile checkbox checked for you when you load it.
In my testing (with Waler installed) everything seemed to work correctly. Instead of setting these values in the OnPrintDialogCreate, try setting them before you call Report.Print and see if that changes the result.
Many of the PrintDialog properties are set automatically based on the report property values. Setting these manually could in some cases cause a problem. Try removing the code to set the PrintDialog properties manually and see if that gives you the results you are after.
Comments
If you set the Report.AllowPrintToFile property to True and assign the
Report.DeviceType to a file device such as "TextFile", the PrintDialog will
already have the PrintToFile checkbox checked for you when you load it.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Procedure CiReportOnPrintDialogCreate(
ptr : Pointer;
ppReport : TppReport);
Begin
this_szSettings :=
IDS_REGISTRY_REPORT_PRINTTOFILE_FOLDER;
this_tRegistry := TRegistry.Create;
ppReport.AllowPrintToFile := True;
ppReport.DeviceType := dtReportTextFile;
End;
Yet, when the print dialog appears, the Print To File is unchecked.
Could Waler be doing something here?
Joe
In my testing (with Waler installed) everything seemed to work correctly.
Instead of setting these values in the OnPrintDialogCreate, try setting them
before you call Report.Print and see if that changes the result.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
vs just setting the device.
Thanks
property values. Setting these manually could in some cases cause a
problem. Try removing the code to set the PrintDialog properties manually
and see if that gives you the results you are after.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com