Changes

Jump to: navigation, search

Upgrade iReports to 6.0

6 bytes removed, 07:40, 7 July 2015
no edit summary
When upgrading IMSMA from 5.08.04 to V6, the iReport templates, if there are any, need to be upgraded separately - this is not included in any automatic process. Custom report templates as well as created reports will be transferred to V6, but they will not be working/usable. In order to make them usable, follow the steps as described on this page.
{{IMSMANG}} version 6.0 comes with 35 inspirational iReport templates. Therefore, if there are more than 35 in the '''Report Template Manager''' in the Customisation menu, it means that custom ones have been created by the country, and need to be investigated one by one. The names of all the inspirational iReport templates start with either:
* List - xxx, e.g. List - Land
* Geospatial - xx, e.g. Geospatial - Activity
* Statistics - xx, e.g. Statistics - Land with Ordnance Details
In {{IMSMANG}} version 6.0 there are 3 Report definitions. Therefore, if there are more than 3 in the '''Report List Window''' in the Report menu, it means that the custom Report definitions have been done by the country. After the iReports templates themselves have been upgraded then the templates have to be tested with their Saved Searches.
{|
|- valign="top"
The templates that shall be upgraded need to be opened with iReport. If the .jrml files were '''not''' included in the backup then you may extract them from the database with the following steps are required:
* Use pgAdmin3 or Navicat to connect to the imsma database
* Open the table called '''reporttemplate''' or issue the following query:
<pre>
SELECT * FROM reporttemplate ORDER BY name
Choose the right data source. If you are not sure, look in the table in column ''Type''.
==== Adapt GUID fields ====__NOEDITSECTION__
* Switch back to the Designer view of the report.
* Expand the Fields in the Report Inspector and look for the field '''guid'''
[[File:iReport_guid_field.png|center]]
* If a guid field exists, select it and, in the '''Properties''' window on the right-hand side, click on the dots next to '''Properties'''
[[File:iReport_guid_properties.png|center]]
* In the next dialog window, click '''Add'''.
* In the add/modify property window, add the following:
** Property name: '''imsma.type'''
** Property value: object name, e.g. '''HAZARD''' or '''HAZARD_REDUCTION''', etc. depending on the object (data source) that the report is defined on
[[File:iReport_guid_properties_add.png|center]]
* Click OK twice to save and exit.
==== Adapt SQL fields ====__NOEDITSECTION__
SQL fields, if used in a report, need to be adapted in two ways:
* The need to be renamed from '''com.fgm.imsma.ext.report.xxx'''to e.g. '''HazardSQLField'''. In order to be sure about the spelling, an empty report containing all fields of a data source can be created, which then allows to copy-paste fields from this empty report into the ones that is being upgraded.
* The SQL query needs to be adapted to the PostgreSQL syntax. Check [[http://mwiki.gichd.org/IM/Difference_MySQL_PostGreSQL#Most_common_changes_in_queries_and_views_from_MySQL_to_PostgreSQL|this page]] for more details.
==== Adapt field names ====__NOEDITSECTION__
6,632
edits

Navigation menu