Print a report without any dialogs forms showing up

edited March 2010 in Devices
I would like to print a reports an a batch mode. Without any forms, like
print preview forms or print setup forms from appearing.

I am using Report Builder 7.
I am unable to find a suitable property within Report Builder 7. That
would stop the dialogs forms from appearing.

Roger Gilmore

Comments

  • edited March 2010

    Try...

    myReport.ShowPrintDialog := False;
    myReport.ShowCancelDialog := False;
    myReport.Print;

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2010
    Hmmm. I'm looking into a similar situation and this information is *almost*
    what I'm looking for.

    Now, all I need to do is to control *which printer* is used for printing. I
    have (in code) the printer name that displays on the dialog
    (\\server\printer, in our case), but I don't know how to set it on the
    TppCustomReport or TppCustomPrintDialog (Printer property is TObject).

    I'm using ReportBuilder Server 10.08.

    I'd appreciate any pointers you could give. Thanks.

    --
    Mattias Andersson
    Software Developer, SpeedLine Solutions, Inc.
    remove@thispartMAnderssonAtDomainSpeedLineSolutionsDotComNotDotNet.net


  • edited March 2010
    Hi Mattias,

    If you are setting the ShowPrintDialog property to False, the Print dialog
    will not be created and there is no need to set the printer for the dialog
    :).

    In code you can use the Report.PrinterSetup.PrinterName property to manually
    set the printer in code. We recommend using the PrinterSetup.PrinterNames
    list to select the proper name as printer names can be different for
    different machines.

    Report.PrinterSetup.PrinterName := Report.PrinterSetup.PrinterNames[0];

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    "Mattias Andersson"

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2010
    Thank you very much! I don't know how I didn't notice those properties,
    before, but they work like a charm.

    (FWIW, I was looking into the Print Dialog because I thought I might have to
    let it show up and then control its properties and close it from
    OnPrintDialogCreate; I'm glad that's not the case. :-) )

    --
    Mattias Andersson
    Software Developer, SpeedLine Solutions, Inc.
    remove@thispartMAnderssonAtDomainSpeedLineSolutionsDotComNotDotNet.net


This discussion has been closed.