Difference between revisions of "Recover iReport template"
From IMSMA Wiki
Line 20: | Line 20: | ||
"Parent"."name" = 'Statistics - Land with Ordnance Details' | "Parent"."name" = 'Statistics - Land with Ordnance Details' | ||
</pre> | </pre> | ||
− | <li>Copy the contents of the column ''jrxml'' (of the parent and/or child report, as required) to a new NotePad++ file | + | <li>Copy the contents of the column ''jrxml'' (of the parent and/or child report, as required) to a new NotePad++ file.</li> |
− | <li>Open the saved file in iReport and make the required changes. | + | <li>'''Remove the double quotes''' at the very beginning and end of the file.</li> |
− | <li>As required, re-import the changed iReport template into | + | <li>Save it as a '''.jrxml''' file |
+ | : Click '''Save as'''. | ||
+ | : Enter a file name with the extension .jrxml | ||
+ | : Select '''All types (*.*)''' in the Save as type field).</li> | ||
+ | <li>Open the saved file in iReport and make the required changes.</li> | ||
+ | |||
+ | {{Note | If there are subreports, the report will not run inside iReport, as it will not find the subreports(s) - unless all the subreports are also saved as .jrxml files and the references from the main to the subreports are updated. Contact VIE in case of questions on this.}} | ||
+ | |||
+ | <li>As required, re-import the changed iReport template into {{IMSMANG}}.</li> | ||
</ol> | </ol> | ||
Revision as of 11:48, 19 March 2015
The user has lost an iReport template file, but still has the imported template inside IMSMA. The user wants to make changes to the template in iReport and therefore needs to recover the file. The steps to do that are the following:
- In Navicat or pgAdmin3, open the table reporttemplate and identify which iReport is the one for which the file is missing. Reports can be identified by their name.
- In case the report has subreports and those need to be changed, it is important to also locate the subreports.
- The following query checks if the report contains subreports (enter the correct report name in the WHERE clause of this query)
- Copy the contents of the column jrxml (of the parent and/or child report, as required) to a new NotePad++ file.
- Remove the double quotes at the very beginning and end of the file.
- Save it as a .jrxml file
- Click Save as.
- Enter a file name with the extension .jrxml
- Select All types (*.*) in the Save as type field).
- Open the saved file in iReport and make the required changes.
- As required, re-import the changed iReport template into IMSMANG.
SELECT "Parent"."name" AS "Parent name", "Parent".filename AS "Parent file", "Parent".jrxml AS "Parent JRXML", "Child"."name" AS "Child name", "Child".filename AS "Child file", "Child".jrxml AS "Child JRXML" FROM "public".reporttemplate AS "Parent" INNER JOIN "public".reporttemplate AS "Child" ON "Parent".guid = "Child".parent_guid WHERE "Parent"."name" = 'Statistics - Land with Ordnance Details'