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

Printing to file without the Print dialog

edited August 2002 in End User
Hi there,

Im using RB6 with D6.

I need to Print a report to a file or archive without having the Print
Dialog displayed.

I have the ShowPrintDialog set to false, but each time I execute the report
it still gets displayed.

Which properties must I set and which methods must be called to supress the
dialog?

Cheers,
Ben

Comments

  • edited August 2002
    It sounds like you are loading a report template from file (or database?)

    If so then the ShowPrintDialog property value, as saved in the file, will be
    used as opposed to the Delphi design-time value for this property. You can
    either update the template or set the property to False in code:

    uses
    ppTypes;

    ppReport1.Template.LoadFromFile;
    ppReport1.ShowPrintDialog := False;
    ppReport1.DeviceType := dtPrinter;
    ppReport1.Print;

    --
    Cheers,

    Tom Ollar
    Digital Metaphors Corporation
This discussion has been closed.