Controlling end user print dialog
Hello All
Delphi 5, RB 6.03, ExtraDevices
We are trying to configure the print dialog in an end user reporting
solution. We would like to be able to check the 'Print to file' option and
set the file type to Excel for reports that are only intended for output to
Excel.
I have tried using the OnPrintDialogCreate and the GlobalOnCreate events but
the dialog still defaults to the standard print options when displayed.
Is this possible ?
Regards, Paul Hughes.
Delphi 5, RB 6.03, ExtraDevices
We are trying to configure the print dialog in an end user reporting
solution. We would like to be able to check the 'Print to file' option and
set the file type to Excel for reports that are only intended for output to
Excel.
I have tried using the OnPrintDialogCreate and the GlobalOnCreate events but
the dialog still defaults to the standard print options when displayed.
Is this possible ?
Regards, Paul Hughes.
This discussion has been closed.
Comments
shown below.....
{---------------------------------------------------------------------------
---}
{ TmyEndUserSolution.LoadEndEvent }
procedure TmyEndUserSolution.LoadEndEvent(Sender: TObject);
begin
ppReport1.OnPreviewFormCreate := PreviewFormCreateEvent;
ppReport1.OnPrintDialogCreate := PrintDialogCreateEvent;
end; {procedure, LoadEndEvent}
{---------------------------------------------------------------------------
---}
{ TmyEndUserSolution.PrintDialogCreateEvent }
procedure TmyEndUserSolution.PrintDialogCreateEvent(Sender: TObject);
begin
ppReport1.PrintDialog.AllowPrintToFile := True;
ppReport1.PrintDialog.TextFileName := 'c:\myReport.txt';
ppReport1.PrintDialog.DeviceType := dtReportTextFile;
end;
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
What I was after was a way of doing this from RAP so that within a report
designed for output to Excel ( using ExtraDevices ), I can set up the print
dialog to expect output to a file rather than the printer.
Cheers, Paul.