Dashboard > DHIS Documentation > Home > Design a DHIS 2 report with Report tool and iReport
  DHIS Documentation Log In | Sign Up   View a printable version of the current page.  
  Design a DHIS 2 report with Report tool and iReport
Added by Quang Nguyen, last edited by Quang Nguyen on Nov 02, 2006  (view change)
Labels: 
(None)

Why do we need this page?

The report tool can make a report automatically but just follow a few templates. Sometimes you need your own report template, and this page can help you.

Preparation

  1. Download and install DHIS 2
  2. Download and install iReport from http://sourceforge.net/projects/ireport/

Implementation

  1. Run DHIS 2, go to Report tool, make new report, for example: children_report
  2. Click edit button to choose the included data elements, indicators.
  3. Click ?Generate design? button and then ?Done? button.
  4. Start iReport.
  5. Open the jrxml file was generated by report tool in user-home/dhis/rt/design/jrxml. In here is children_report.jrxml
  6. One DHIS 2 report template includes 2 things:
    • Static texts: we can modify all static text in report, and move them follow our template.
    • Parameters: to get the values from report tool, we can move them follow our template, but cannot change the name.
  7. After change the report follow our template, we can save and quit iReport, next time, when we export report, we will get new template.

Notice

If the report elements (data element, indicator name or shortname) include ?<?, ?>?, ?&? characters, report tool will be crashed. The solution is:

  • Before modifying the report template with iReport, we open it by a text editor, copy all of parameter tab to a difference file. (It?s easy to recognize them because they begin with ?<parameter name="??).
    <parameter name="DataElement:T�ng s� trẻ SS DC" isForPrompting="false" class="java.lang.String"/>
    <parameter name="DataElement:TS trẻ SS&lt; 2500gr" isForPrompting="false" class="java.lang.String"/>
    <parameter name="DataElement:Suy dinh dưỡng Ä?á»? 2" isForPrompting="false" class="java.lang.String"/>
    <parameter name="DataElement:Suy dinh dưỡng Ä?á»? 3" isForPrompting="false" class="java.lang.String"/>
    <parameter name="DataElement:TS trẻ&lt;36t u�ng A" isForPrompting="false" class="java.lang.String"/>
  • After modifying the report template with iReport, restore the backup parameters.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators