Creating and Using BIRT Reports
search cancel

Creating and Using BIRT Reports

book

Article ID: 415937

calendar_today

Updated On:

Products

CA Harvest Software Change Manager CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

The online documentation shows how to install the BIRT Reporting plugin.  This article shows how to create and run a BIRT report.

Environment

Harvest Software Change Manager v14.5.01 and higher

Resolution

After successfully installing the Harvest Eclipse plugin and the BIRT reporting plugin, you will see a new item in the CA Harvest SCM menu

And a new icon on the toolbar

Select your broker name and click either of these to open the "Custom Dash Board Reports" window.

To create a new custom report, click the "Add" button.  The "New Custom Report" window will open to let you provide the details for the custom report you want to create.  At the top of the "New Custom Reports" window you will designate the scope of the report, its title, and to which broker (if you have created more than one broker connection) the report definition will be saved.

For the "Scope" you will specify the context or area of interest for this report.  The options are:

  • Broker - Report is intended to show results across all project in the repository.  An example might be a report listing the user groups assigned to this user.
  • Project - Report is intended for a specific project.  An example might be how many packages are in each state in the project.
  • State - Report is intended for a specific state within a project.  An example might be a listing of all packages in the state.
  • Package - Report is intended for a specific package within a project.  An example might be a listing of the files checked into the specific package and their status.

The next section of the "New Custom Reports" window lets you select how you want the query results displayed.  Options are Table (columns and rows), Bar Chart, and Pie Chart.

In the lower half of the "New Custom Reports" window you will provide the SQL "select" query that returns the result you need for this report.

Depending on the "scope" you have selected, certain variables will be available to pass into your SQL query to return results for the specific object selected.

    Broker level Project level State level Package level
${USER_ID} Object id of the user logged into this broker connection
${PROJECT_ID} Object id of the selected project  
${STATE_ID} Object id of the selected state    
${WORKING_VIEW_ID} Object id of the data view for the selected state    
${PACKAGE_ID} Object id of the selected package      


For "broker-level" reports, you can pass in the id of the user logged into this broker connection in Eclipse with a variable named "${USER_ID}".

Example:

SELECT usergroupname
FROM harusergroup
INNER JOIN harusersingroup ON harusergroup.usrgrpobjid = harusersingroup.usrgrpobjid
WHERE harusersingroup.usrobjid = ${USER_ID}


For "project-level" reports, you can pass in the id of the selected project with a variable named "${PROJECT_ID}".

Example:

SELECT statename, COUNT(packagename) AS PACKAGES
FROM harstate
LEFT OUTER JOIN harpackage ON harstate.stateobjid = harpackage.stateobjid
WHERE harstate.envobjid = ${PROJECT_ID}
GROUP BY statename


For "state-level" reports, you can pass in the id of the selected state to a variable named "${STATE_ID}".  Since the state is within a specific project, you can also use the variable ${PROJECT_ID} for the project for your state.

Example:

SELECT packagename as PACKAGE FROM harpackage WHERE harpackage.stateobjid = ${STATE_ID} and harpackage.envobjid = ${PROJECT_ID}


For "package-level" reports, you can pass in the id of the selected package to a variable named "${PACKAGE_ID}".    Since the package is within a specific project and state, you can also use the variables for the project and state for your package.

Example:

SELECT packagename, itemname, mappedversion, versionstatus
FROM harversions 
INNER JOIN haritemname ON harversions.itemnameid = haritemname.nameobjid 
INNER JOIN harpackage ON harversions.packageobjid = harpackage.packageobjid 
WHERE harpackage.packageobjid = ${PACKAGE_ID} 
AND harpackage.stateobjid = ${STATE_ID} 
AND harpackage.envobjid = ${PROJECT_ID}


When all entries are completed, your "New Custom Report" window will be similar to this:

And your "Custom Dash Board Reports" window will look similar to this:

Once the report has been defined, you can run the report by right clicking on an object in the Harvest "Explorer" tab, select "Custom Reports" and the title of the report from the context menu.  The list of available custom reports will depend on the object you have selected.  In this example, I have right clicked on a package, so the package-level reports will be listed.

When you select the report to execute, the "Report Viewer" tab appears in the lower right quadrant of the window.

If you double-click on the "Report Viewer" tab, you can make the report occupy the entire window, like this:

 

Additional Information

The BIRT reports feature of Harvest does not include any pre-packaged reports.  The user will need to develop their own SQL to create the needed reports for their environment.

This article explains how to extract a listing of all the tables and columns in the Harvest database.  This can be used to develop the custom SQL needed to create custom reports:

Database table descriptions