CONTENTS
NSTALLATION ............................................................................................................. 3
Download sites: ........................................................................................................................................ 3
Step One: Install Report designer .......................................................................................................... 3
Step Two: Install MI Agent ...................................................................................................................... 3
Step Three: Set up Birt Viewer .............................................................................................................. 3
Step 4: Link Birt Viewer and CDK ........................................................................................................... 3
ADDING A MAP TO A REPORT .................................................................................. 5
DISPLAYING THE MAP IN OTHER FORMATS .......................................................... 8
NSTALLATION
DOWNLOAD SITES:
http://download.eclipse.org/birt/downloads/
http://www.birt-exchange.com/be/downloads/resources/?articleid=17377
Tested with Birt version 2.3
STEP ONE: INSTALL REPORT DESIGNER
Install Eclipse BIRT Report Designer All-in-One
Create Reports
to connect to PostGres, add PostGres jar to: [eclipse
directory]\eclipse\plugins\org.eclipse.birt.report.data.oda.jdbc_2.3.2.r232_v20090212\drivers
STEP TWO: INSTALL MI AGENT
Install CDK
Add MIClient jar to: [CDK Dir]\tomcat\webapps\miclient\WEB-INF\lib
STEP THREE: SET UP BIRT VIEWER
Download and deploy birt viewer webapp into CDK webapps
To connect to PostGres, add PostGres jar to: [CDK Dir]\tomcat\webapps\birt\WEB-
INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc_2.3.2.r232_v20090212\drivers
Add MIClient jar to: [CDK Dir]\tomcat\webapps\birt-viewer\scriptlib
Add miBirtHandler.properties to [CDK
Dir]\tomcat\webapps\birt\properties\miBirtHandler.properties
o create the directory if necessary
o edit the properties file to point to the CDK webserver
STEP 4: LINK BIRT VIEWER AND CDK
Add the following libraries from the BirtViewer webapp to: [CDK
Dir]\tomcat\webapps\miclient\WEB-INF\lib
o modelapi.jar
o modelodaapi.jar
o odadesignapi.jar
o org.apache.commons.codec_1.3.0.v200706111738.jar
o org.eclipse.emf.common_2.2.1.v200702131851.jar
o org.eclipse.emf.ecore.xmi_2.2.2.v200702131851.jar
o org.eclipse.emf.ecore_2.2.2.v200702131851.jar
o org.w3c.css.sac_1.3.0.v200706111724.jar
o scriptapi.jar
Copy platforms directory from [CDK Dir]\tomcat\webapps\birt\WEB-INF\platform to [CDK
Dir]\tomcat\webapps\miclient\WEB-INF
Copy commons-logging-1.1.jar from [CDK Dir]\tomcat\webapps\miclient\WEB-INF\lib to
[CDK Dir]\tomcat\webapps\birt\WEB-INF\lib
Add the following to the client.properties file [CDK Dir]\tomcat\webapps\miclient\WEB-
INF\properties\client
o data-file-dir = [CDK Dir]/tomcat/webapps/birt/report/[directory containing your
reports]/
o birt-log-dir = [CDK Dir]
o birt-log-level = "DEBUG"
o birt-rptdocument-file-dir = [CDK Dir]/tomcat/webapps/birt/documents/
o config-server-URL = http://localhost:9091
o rptdocument-dir=[CDK
Dir]\tomcat\webapps\birt\report\.metadata\.plugins\org.eclipse.birt.report.viewer\docu
ments
ADDING A MAP TO A REPORT
1. Save the report to the directory pointed to by the data-file-dir variable as defined in
[CDK Dir]\tomcat\webapps\miclient\WEB-INF\properties\client\client.properties
BIRT has two file types associated with each report. The report.rptdesign file is the
actual report definition file that stores the design of the report in xml format. The data-
file-dir variable points to the location of these files for the agent to find.
data-file-dir = C:/Program Files/Integeo/CDK/tomcat/webapps/birt-viewer/
2. Use the agent to configure map
3. Open the report in eclipse
4. Drag on a grid (or use an existing grid)
5. Drag on a Text component from the Palette
6. In the property editor set the name to ‘Map Viewer’ (not required) and set the content
type to HTML.
Note: if you want to debug the request, set this back to text and it will display the request
instead of the map viewer.
7. In the properties tab scroll down to the Property ‘Event Handler Class’ and set it to
com.integeo.mapIntelligence.client.MIBrowserEventHandler. If Eclipse isn’t aware of the MIClient.jar file
you will have type this class name in.
(See http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.birt.doc/birt/ScriptingWithJava.html for
more info)
8. In the property editor scroll up until you see the Visibility property. Set it to only display for HTML as
follows.
DISPLAYING THE MAP IN OTHER FORMATS
1. If you want the map to appear in outputs other than html do the following.
2. Given that the text field added above won’t appear in outputs other than HTML, add a new set of components
to provide print output.
3. Add another row to the grid and drag in an image component from the palette.
4. Set its Event handler class to com.integeo.mapIntelligence.client.MIPrintEventHandler
5. Set its visibility to only be hidden in HTML output as below
6. Add another cell to the grid where you would want the print legend to appear.
7. Drag on another Image component, set its visibility to be hidden in HTML as above and set its Event Handler
class to be com.integeo.mapIntelligence.client.MILegendEventHandler.
Note: Given that we can now get Print templates, I would recommend creating a new class based on
MIPrintEventHandler to get a print template back as an image instead of the map and legend separately.
After you have down all of this and the layout etc is all working ok. Then create a library item of the whole grid
(assuming it just has the map bits in it). This allows all of the above to be reused in other reports.
1. Click on the tab for the grid containing the map components (you could add any labels etc that you wish
to reuse to this grid before doing this, but there are (or were) some limitations to changes that you can
make to library items when using them in other reports.
Make sure the grid has a decent name
2. Right click on the tab and select ‘Export to Library…’
3. In the Export element choose an existing library or enter the name for a new one as above.
4. Select OK
5. In the next report you wish to map enable, instead of creating the grid and adding components as above
do the following
a. Navigate to the Resource Ex tab beside the Palette tab
b. Navigate to your library as created above
c. Expand the report Items section where you should see your grid as saved above.
d. Drag the grid onto your report as if it came from the palette.
e. Done.