Server Administration > Reports > Advanced Report Recipe Writing > Exporting and Importing a Report Template
  
Exporting and Importing a Report Template
Earlier reports were created using a report template rather than a report recipe. The report template is still part of the reporting framework and is used as an intermediate step between the recipe and the displayed report.
The template is stored in the database and can be viewed using the CLI. The extracted template can then be used to create a report from the CLI. Reports created using report templates cannot be read or used by the report wizard. The code must be edited in a text editor to make it compatible. PTC does not recommend creating reports from report templates unless there is a specific need.
The following example describes how to export a report template from an existing report (Report Recipe – Basic) and then create a new report using that report template:
1. Export the report template for the Report Recipe – Basic report:
im viewreport "Report Recipe - Basic" > basic_report.txt
2. Create a new report using the output from the im viewreport command:
a. Remove all the text above the <HTML> tag and below the </HTML> tag in the basic_report.txt file.
b. Save your changes.
3. Run the following command:
im createreport --reportTemplateFile="basic_report.txt"
--name="Report Recipe – Report Template Report"
-–query="All Items" -–sharedAdmin
A new report is created in the Windchill RV&S administration client called Report Recipe – Report Template Report.
4. In the Windchill RV&S administration client , run Report Recipe – Report Template Report.
The report looks exactly the same as the Report Recipe Training – Basic report.
5. In the Windchill RV&S administration client, edit the Report Recipe – Report Template Report.
Instead of the Report Wizard displaying, the report editor displays as follows:
6. Click the Template tab.
7. To update the report, edit the HTML and report tags and save the report.