The web blog strives to be a comprehensive guide to SCCD, TADDM, SERVICE NOW and MAXIMO tools. This is a personal site maintained solely by me. I intend to update it regularly.For live updates please follow us on.

Simple BIRT Report example

Simple BIRT Report example

This report will display the host name of any Linux systems that have more than one CPU, listed by number of CPU s (highest to lowest).
This example assumes that the BIRT RCP Designer is installed on a Windows system. You need to able to copy files from the Linux system to the Windows system, specifically the Java Database Connectivity (JDBC) .jar files for your database type.

This BIRT example will be a report based on a query we implement against the details panel database views in TADDM. The first task is to locate the Details Panel with the required information in the TADDM product console:

1. Open the the TADDM product console.
2. Select List/Search in the drop-down list under Discovered Components.
3. Select Linux Computer System in the Component drop-down list.
4. Right-click on one of the systems and then choose Show Details from the pop-up menu.

On the General tab, we see "Number of Logical CPU s". We also see the host name, which is the other required attribute.
Now we need to find the details panel database view for this tab.

Creating a New Report

To create the new report:

1. Start the BIRT report designer.
2. Click File --> New --> New Report.
3. Specify linuxcpu.rptdesign as the file name.
4. Click Finish.

Creating a Data Source

Create a data source to point to the TADDM database:

1. In the Outline View, right-click on Data Sources.
2. Select New Data Source from the pop-up menu.
3. Select JDBC Data Source from the list of data source types.
4. Specify "TADDM" as the data source name.
5. Click Next.

You will need to refer to the TADDM configuration file. Note the following configuration parameters:

    com.collation.db.user= <user_name>
    com.collation.db.password= <encrypted_password>
    com.collation.db.url= <database_url>
    com.collation.db.driver= <jdbc_driver_class>

In the drop-down list for Driver Class, select the corresponding JDBC driver class as identified in the file. If the correct driver class is not located in the drop-down list, you must add it:

1. Click Manage Drivers.
2. Click Add.
3. Locate the db2jcc.jar or oracle-jdbc-9.2.jar driver file on your system (you can copy this from the TADDM Server in $COLLATION_HOME/lib/jdbc).
4. Click OK.

For Database URL, User Name, and Password, specify the values used to connect to the TADDM database as found in the file.

Note: The password is encrypted in the configuration file, so you should contact your database administrator for the password.

Click Test Connection, and you should see a message stating "Connection Successful." Click Finish.

Creating a Data Set

Create a data set to point to the required database views:

1. In the Data Explorer view, right-click Data Sets.
2. Select New Data Set.
3. In the Data Set Name field, specify 'Data Set1.'
4. In the Data Source field, specify TADDM.
5. In the Data Set Type field, select SQL Select Query.
6. Click Next.

In the Query panel, select View from the Type drop-down list, and enter DP_LINUX for the Filter name. Then click Apply Filter. Note that all the detail panel view names start with DP_ and then the name of the relevant component.

Click the plus sign next to the user (same as the User Name above).

In this case, the first name (DP_LINUX_COMP_GENERAL_V) looks like the correct one, since it relates to a tab called General on a component called Linux Computer System.

In the SQL query editor, place the cursor after 'from', then double-click on DP_LINUX_COMP_GENERAL_V. This copies the view name into the pane. Click next to "select" in the query editor and then type '*'. The window should now look like this (the user name may differ):

Click Finish, which brings up the Edit Data Set panel. Click Preview Results, and locate the same Linux system that was displayed in the details panel tab in the TADDM product console. Verify that the same data is displayed here. If not, select Query on the left side of the Edit Data Set panel to modify the SQL query.

To clean up the column names in the report:

1. Select Output Columns.
3. Enter 'Host name' in the Display Name field.
5. Enter Number of CPUs in the Display Name field.
6. Click OK.

Modifying the SQL Query

To modify the SQL query:

1. Right-click Data Set1 and then choose Edit from the pop-up menu.
2. Enter DP_LINUX_COMP_GENERAL_V as the Filter.
3. Click Apply Filter.
4. In the SQL pane, remove the * after the word select.
5. With the cursor one space after the word select, double-click on the column that starts FULLY_QUAL, then double-click on the column that starts NUMBER_OF_LOGICAL.
6. Since we need the data to be displayed only when the number of CPUs is more than 1, add a WHERE clause for filtering. Also, since the data should be ordered highest to lowest (descending) on number of CPUs, add an 'ORDER BY' clause. You query should look like this:

Verify the results of the query by selecting Preview Results in the Edit Data Set window. When you are satisfied the SQL query is correct, click OK.

Add Content to the Report

The following sections describe how to add content to the report.

Adding a Label

To add a label:

1. In the Palette view, select Label and drag to right-hand pane (layout tab of tab).
2. In the layout tab, double-click the label.
3. Type "Multi-processor Linux Systems."
4. In the Property Editor below, go to Properties --> General.
5. Select the Arial font, 14 points in size, with yellow as the background color.
6. Go to Properties --> Padding.
7. Specify 20 points for top, left and bottom.

Adding a Table

To add a table:

1. In the Palette view, select Table and drag under the label you just added.
2. Enter 2 for the number of columns, and Data Set1 for Data Set.
3. Click OK.
4. In the Data Explorer view, expand Data Set1.
5. Select Host name and drag into the Detail Row in the first column in the table in the layout tab. The title should be filled in automatically for the first column.
6. Select 'Number of CPU s', then drag into the Detail Row in the second column. Again, the title row should be filled in automatically. You should have a screen similar to:

Testing the Report

To test the BIRT report, select the Preview tab in the linuxcpu.rptdesign editor. Or, to view the report as it would appear through a Web browser, select File --> View Report --> View Report In Web Browser.

Importing BIRT Reports into TADDM

To import a new BIRT report into TADDM:

1. Open the TADDM Domain Manager console.
2. Select Analytics --> BIRT Reports --> Add.
3. Specify a name for the report and the location of the rptdesign file that you created with the BIRT designer tool (<BIRT_Design_directory>\workspace\linuxcpu.rptdesign).
4. Click OK.
5. Click Refresh. A new entry should be added to the BIRT report list. To execute the new report, select the report from the list, then select Run Report.