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

Setting Defaults for Print to File

edited July 2015 in Devices
I'm forcing output to a file.

ppReport1.Device := dvfile;

This brings up the print dialog.

I'd like to be able to preselect for the enduser the file type and
destination path rather than have them have to change it in the print
dialog.

And, if possible, having preselected the defaults, suppress showing
the print dialog altogether and just output to the file.

TIA for any hints.

John

Comments

  • edited July 2015
    Self answered by finding previous posts in this NG.

    if OpenwithAdobe1.Checked then
    begin
    ppReport1.DeviceType := 'PDF';
    ppReport1.AllowPrintToFile := True;
    ppReport1.TextFileName := 'c:\temp\Report.pdf';
    ppReport1.ShowPrintDialog := False;
    end else ppReport1.Device := dvscreen;

This discussion has been closed.