You can load and save report layouts to files using the Report Designer. You can also load and save layouts programmatically.
1 Using the Report Designer
Set the Report.Template.SaveTo property to stFile (this is the default value).
Select the File | Save As... menu option from within the Report Designer. The standard Windows file save dialog will be displayed, enabling you to save the report template to a .rtm file.
Select the File | Open... menu option from within the Report Designer. The standard Window file open dialog will be displayed, enabling you to select and open a .rtm file.
A Saving a Report Layout
The following code saves a report in the 'test.rtm' file:
ppReport1.Template.FileName := 'c:\test.rtm'; ppReport1.Template.SaveToFile;
B Loading a Report Template
The following code opens a report layout and prints the report:
ppReport1.Template.FileName := 'c:\test.rtm'; ppReport1.Template.LoadFromFile; ppReport.Print;
Was this article helpful?
What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.