Filebased Templates

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).

A Saving a Report Layout

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.

B Loading a Report Template

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.

2 Programmatically

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?

+1 0
Project Management Made Easy

Project Management Made Easy

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.

Get My Free Ebook


Responses

  • Awate Semere
    How to design rtm reports using firebird database?
    9 years ago
  • mirin mcintyre
    How to open rtm file report template?
    9 years ago

Post a comment