can I use one ppReport with different report files from delphi?
Hi,
I wonder if I can have only one ppReport in my program and them according to
query load the appropriate report file (rtm).
For instance I would like to have one report and then according to what the
user selects to load labels1X4 or labels1X3 report file.
Currently I have a separate ppReport for each rtm file.
Thanks,
George
I wonder if I can have only one ppReport in my program and them according to
query load the appropriate report file (rtm).
For instance I would like to have one report and then according to what the
user selects to load labels1X4 or labels1X3 report file.
Currently I have a separate ppReport for each rtm file.
Thanks,
George
This discussion has been closed.
Comments
Yes... this is definitely possible and is the recommended way of creating
such an application. Loading a template from file to a report object is
very simple. The code snip below shows how you should do this.
ppReport.Template.FileName := 'MyTemplate.rtm';
ppReport.Template.LoadFromFile;
ppReport.Print;
Based on the user selection, you can change the file name and load a
different template using the same report object.
Check out the ReportBuilder Demos (\RBuilder\Demos\...) and the
ReportBuilder Developer's Guide (/RBuilder\Developer's Guide\...) for more
information on loading templates.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I was about to ask the same question as George.
Does that mean, that I can have one "naked" report on my form without having
all the report's objects being defined in my Unit and still use the reports
as if, provided that I have saved all my reports properly and load them at
runtime?
Stefan
Yes, that is exactly what I would recommend.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com