Dashboard > Report and analysis modules > Home > Designing the Birt Reports for DHIS2
  Report and analysis modules Log In | Sign Up   View a printable version of the current page.  
  Designing the Birt Reports for DHIS2
Added by Masoud H Mahundi, last edited by Ola Hodne Titlestad on Sep 15, 2008  (view change)
Labels: 
(None)

A Step by Step guide

1.Copy the file postgresql-8.3-603.jdbc3.jar to the folder C:\tools\birt-rcp-report-designer-2_3_0\plugins\org.eclipse.birt.report.data.oda.jdbc_2.3.0.v20080610\drivers, for the designer version 2-3-0

This will serve as a connection between the reports to be designed and the database from which you will be fetching data.
 

2. Create the data table in the DHIS 2 database that will be read by the designed birt report.
From the DHIS2, Reports àCreate Report Table then select the relevant information

Notice

  • Do not cross tab all the dimensions.
  • For a report to used in the coming periods, do not select any period, instead, go to relative periods and select the interval you prefer
  • You must be able to see the new table you just created in the database used by the DHIS2

3. Create a new report template in the Birt Designer. File à New à New Report

3.1 The file has to be saved in a location where the DHIS 2 will find it,C:\Program Files\DHIS2OH-2.0\tomcat\webapps\birt.
Then go "next" and opt for a blank report

3.2 Specify the connection between the birt reports and the database from which to fetch data. (facilitated by step 1)
Right click "Data Source" and choose "New Data Source". In the list, go for "JDBC Data Source", then fill in as shown below

  • Driver Class: org.postgresql.Driver (v8.3)
  • Driver URL: jdbc:postgresql:<name of the database you are using> (this is just copied from the hibernate.properties file, the url line)
  • User Name: <Name of the Database User> (also copied from the hibernate.properties, in the line with user name)

Test the Connection, if successful, go for "finish" and you are done with the connection

3.3 After connecting to the database, connect to the specific table that you created, report table.
Right-click on the "Data Set" New Data Set <give it a name>  Next
Pick the relevant report table. Refer to the following figure for the directives below

In the middle column you will find the option Type, opt for tables and then 'Apply Filter'
The query in the right column needs to be completed. In the select add a star for all columns. Put a cursor just after 'from' and go for 'public' in the middle column and double-click the table for this report. Then à OK àOK

3.4 Do the rest of dragging and dropping

4. The Report's link can now be put in the DHIS 2, ready to be viewed.
Report à Create Report (Under Report heading) à and complete the fields as shown by the example below

Then Add

5. View the reports now
Report à Report à View Report
Go for the 'View Report' and you will see the report listed. Click the view and voila! You see the report

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