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

how to save report to file?

edited June 2004 in End User
Hello,

Somebody know how to save to file a report through the code?
Without showing dialog box.


Thanks


Dexter

Comments

  • edited June 2004
    Hi Dexter,

    You need to use the Report.Template class to save a report to file in code.
    See the example below.

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    ppReport1.Template.FileName := 'C:\MyReport.rtm';
    ppReport1.Template.SaveToFile;

    end;

    --
    Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
    Delphi Informant Readers Choice awards!

    http://www.delphizine.com/ballot2004/

    Best Regards,

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