Home General

Print without preview

edited December 2015 in General
Is there a way to prevent previewing a report and directly open the
print-dialog on calling report.print?

Comments

  • edited December 2015
    On 09/12/2015 15:27, Carsten Eider wrote:

    Report.DeviceType := dtPrinter;
    Report.ShowPrintDialog := True;
    Report.print;
  • edited December 2015
    Ok, i have to be more precise: preview should not be displayed, but the
    printdialog to export to a file

    Paul Toms machte diesen Vorschlag :
  • edited December 2015
    On 09/12/2015 20:32, Carsten Eider wrote:

    Report.DeviceType := dtPrinter;
    Report.AllowPrintToFile := True;
    Report.ShowPrintDialog := True;
    Report.print;
  • edited December 2015
    Similar to Paul's answer you will want to do something like the following...

    Report.AllowPrintToFile := True;
    Report.ShowPrintDialog := True;

    Report.DeviceType := 'PDF';

    Report.Print;

    See the TppReport.DeviceType help topic for more information about
    setting a default device type. You can also use the DefaultDeviceType
    property to further control the initial state of the print dialog.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2015
    In 5.56 we used
    aReport.DeviceType := 'PDFFile';
    In 16.03 we have to use
    aReport.DeviceType := 'PDF';

    Nico Cizik (Digital Metaphors) hat uns dieses gebracht :
  • edited December 2015
    ReportBuilder did not include native PDF export until version 9.

    You were likely using a third party export addon such as ExtraDevices
    (which I believe used "PDFFile" as their device definition).

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.