0% found this document useful (0 votes)
213 views

BIRT Report Development in Maximo 7

This document provides instructions for setting up a BIRT development environment to create reports for Maximo 7. It describes: 1. Installing BIRT Report Designer 2.1.2 and configuring it for the Maximo database. 2. Creating a new BIRT workspace and project, importing standard Maximo reports as templates. 3. Developing a simple list report for Maximo by selecting a template, writing SQL to populate the data set, and setting column data types.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
213 views

BIRT Report Development in Maximo 7

This document provides instructions for setting up a BIRT development environment to create reports for Maximo 7. It describes: 1. Installing BIRT Report Designer 2.1.2 and configuring it for the Maximo database. 2. Creating a new BIRT workspace and project, importing standard Maximo reports as templates. 3. Developing a simple list report for Maximo by selecting a template, writing SQL to populate the data set, and setting column data types.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

BIRT Report Development for Maximo 7

Overview:

This document for the audience who are very new to BIRT, it explains about how to setup
BIRT environment, how create and configure new workspace and how to develop BIRT reports for
Maximo 7

System requirements:

1. BIRTDesigner212
2. Java SDK 1.5
3. Standard Maximo 7 BIRT reports, Libraries and Templates
4. iText Jar

1. Steps to setup BIRT environment:


The following steps explain how to install BIRT Report Designer 2.1.2 and how to
provide Maximo database credentials and how to enable PDF view for the designer.

I. Run Install

Extract BIRTDesigner212.zip and click on BIRTDESIGNER212.exe

Click “Next” in all installation phases to get default installation of BIRT 2.1.2

Siva K Gunukula Page 1 4/1/2009


By default BIRT designer installs in the following location.

C:\Program Files\IBM\BIRTDesigner212

II. Copy iText.jar

Navigate to the following location and copy iText.jar (this is get PDF preview)

C:\Program Files\IBM\BIRTDesigner212\eclipse\plugins

III. Copy Classes

Copy entire classes folder from Maximo 7 instalation folder (i.e.


“C:\Maximo\reports\birt\scriptlibrary”) to BIRT 212 plugins\viewer_version folder (i.e.
“C:\Program
Files\IBM\BIRTDesigner212\eclipse\plugins\org.eclipse.birt.report.viewer_2.1.2.v20070
205-1728\birt\WEB-INF”)

Siva K Gunukula Page 2 4/1/2009


IV. Configure Maximo database Properties

Provide the following Maximo Database properties in “mxreportdatasources.properties”


which is located in classes folder (which we copied in the above step)

maximoDataSource.url=jdbc:oracle:thin:@<HOST IP>:1521:MAXIMO
maximoDataSource.driver=oracle.jdbc.driver.OracleDriver
maximoDataSource.username=maximo
maximoDataSource.password=maximo
maximoDataSource.schemaowner=maximo

Siva K Gunukula Page 3 4/1/2009


Note: the above properties may change according to the database configuration and type
and this example depicts the ORACLE database

Siva K Gunukula Page 4 4/1/2009


Copy the corresponding JDBC Driver from Maximo installation folder (i.e.
“C:\Maximo\applications\maximo\lib”) to the following location

C:\Program
Files\IBM\BIRTDesigner212\eclipse\plugins\org.eclipse.birt.report.viewer_2.1.2.v20
070205-1728\birt\WEB-INF\lib

For Oracle, use ojdbc14.jar or oraclethin.jar


For SQL Server, use opta.jar
For DB2, use db2jcc.jar and db2jcc_license_cu.jar

Note: we can get the JDBC deriver from Database installation folder also.

Siva K Gunukula Page 5 4/1/2009


V. Create Shortcut for eclipse.exe & point to JDK 1.5

Move to “C:\Program Files\IBM\BIRTDesigner212\eclipse” location to Create


shortcut for eclipse.exe on desktop

Go to desktop open Properties of the eclipse shortcut (right click  properties)

Siva K Gunukula Page 6 4/1/2009


Change the path of Target to point to Java 1.5 in your machine.

Example: "C:\Program Files\IBM\BIRTDesigner212\eclipse\eclipse.exe" -vm


"C:\Program Files\Java\jdk1.5.0_14\bin\javaw.exe" vmargs -Xmx512m

Note: the above example points to jdk1.5 which is installed in local machine, you have to
change that jdk1.5 path according to your jdk1.5 installation.

Click ok

2. Create and configure new workspace:

The following steps explains how to create workspace for Maximo reports , create
new BIRT report project, configure Maximo 7 standard Templates and Libraries,
Import Maximo 7 standard reports to your workspace.

I. Creating Workspace:

Siva K Gunukula Page 7 4/1/2009


Double click on eclipse shortcut (which is located in desktop)

It will ask to select workspace

Browse your workspace location or make new folder for workspace.


It launches the designer to work then click on workbench.

Siva K Gunukula Page 8 4/1/2009


By default it opens up with Java prospective.

II. Creating New Project:

Go to File  new  project

Siva K Gunukula Page 9 4/1/2009


Select type of project to report project

Click on next

Siva K Gunukula Page 10 4/1/2009


Provide Project name (i.e. Maximo v7 reports in this example) and click finish.

Click Yes in “Open Associated Perspective?” popup


It changes designer Perspective to Report Design perspective.

Siva K Gunukula Page 11 4/1/2009


III. Configuring Libraries & Templates:

Go to Window  Preferences
Expand “Report Design” from left hand side tree view
Select “Resource” and provide the path for Maximo standard BIRT library folder (i.e. “C:\Maximo
714\reports\birt\libraries” in the above example) and click “Apply”

Siva K Gunukula Page 12 4/1/2009


Select Template in the same preferences window and provide the path for Maximo Standard report
templates folder and click “Apply”

Siva K Gunukula Page 13 4/1/2009


Select Comment template on the same “Preferences” window and uncheck the check box and click
ok

Note: if Preferences window is closed, Go to “Window  Preferences” from BIRT designer.

Siva K Gunukula Page 14 4/1/2009


IV. Importing Standard reports:

To import standard Maximo BIRT reports into our workspace


Right click on your project and select “Import”

From “Import” window expand “General” and select “File System” click next.

Siva K Gunukula Page 15 4/1/2009


Then it will opens up “File System” options, form that window Browse Maximo Standard BIRT
reports folder (i.e. “C:\Maximo 714\reports\birt\reports” in this example)
And check the check box beside reports folder in left pane then click on “Finish”

Siva K Gunukula Page 16 4/1/2009


In Navigator pane we can find all the reports imported into our project

Now we can open the Maximo BIRT standard reports in BIRT designer by clicking on the particular
report

Note: selected report opens up in “Layout” tab, if the Layout tab is not selected just click on Layout
tab to see report design.

Siva K Gunukula Page 17 4/1/2009


3. Creating report in BIRT for Maximo 7:
The following example introduces the BIRT Report Designer, and demonstrates how
to create a simple list report for Maximo 7.

Note: Open up the BIRT Report Designer if not opened

I. Select Template:

Create a new report by selecting File-> New -> Report.

Select the parent folder then the COMPANY Folder. And provide a name for the report (i.e.
“company_report.rptdesign” in this example) then Click Next.

Note: This example creates a new report in COMPANY application

Siva K Gunukula Page 18 4/1/2009


Siva K Gunukula Page 19 4/1/2009
In New Report Window, Select the “Tivoli Maximo List Template”. Click Finish.

Siva K Gunukula Page 20 4/1/2009


It displays the blank report design in Layout tab and we can find the report design file in
COMPANY application folder.

II. Populate Data Set:

Use the following sql for this example.

“select compcontact.company, compcontact.contact, compcontact.position, compcontact.email,


compcontact.voicephone, compcontact.faxphone from compcontact”

Note: The BIRT Report Designer does not verify your sql statements – so make sure that your sql
should run properly

Siva K Gunukula Page 21 4/1/2009


From Data Explorer, select the data set. Select the “Script” tab in the main window. Choose the
“open” method from the drop-down list.

Copy the above sql

Siva K Gunukula Page 22 4/1/2009


On the same script tab, select the fetch method from the drop-down list.

Change the code accordingly to accommodate all the selected columns

Siva K Gunukula Page 23 4/1/2009


III. Set Data Types:

Create all output columns by double clicking on the data set name. Select “Output Columns” on
the “Edit Data Set” Dialog.

Enter names and Data types. The Data Types can be retrieved from maxattribute
Use the following sql to get the Data Types

select attributename, maxtype from maxattribute where objectname = 'xxx'.

The corresponding BIRT Data Type is shown in the chart below.

Database Type BIRT Data Data Set Method used to Retrieve


Type
ALN, CLOB, GL, LONGALN, String getString(String attributeName)
LOWER, UPPER
YORN String getBooleanString(String attributeName)
DATE, DATETIME, TIME DateTime getTimestamp(String attributeName)
AMOUNT, DECIMAL, Decimal getDouble(String attributeName)
DURATION
FLOAT Float getFloat(String attributeName)
DURATION String getDuration(String attributeName)
INTEGER, SMALLINT Integer getInteger(String attributeName)

Siva K Gunukula Page 24 4/1/2009


Siva K Gunukula Page 25 4/1/2009
IV. Add title, labels, fields:

Select the layout tab of main window.

Change the report title (as per specification) by double clicking on that particular label and type
the title text.

Siva K Gunukula Page 26 4/1/2009


Delete the grid containing the parameters because we are not going running this report against
any parameters.

Add the data fields to the report. By drag and drop From the Dataset (in “Data” view, expand
the data set. Drag and drop the fields to the layout) in detail row.

Siva K Gunukula Page 27 4/1/2009


Add column headings by typing the text directly in the label field. Only one label is included in
the template, so you will need to add 5 more. Go to the “Palette” pane, and drag and drop 5
more labels.

V. Preview:

Finally, click the “Preview” tab. Since no parameters have been specified, only the two default
report parameters show. Leave the where parameters as it is, and enter COMPANY for the
appname.

Siva K Gunukula Page 28 4/1/2009


Click OK and the Report displays.

To view the out put of Report in PDF, click in BIRT designer and
select “View report as PDF”

Siva K Gunukula Page 29 4/1/2009


Out put will be populated in BIRT web viewer in PDF format. You can save or print report in PDF
format.

Siva K Gunukula Page 30 4/1/2009

You might also like