The ability to use Parameters with a BIRT report can be a wondrous thing. However if you are both new to BIRT and have to use a scripted source like IBM’s Maximo integration, you might find yourself apprehensive on where to begin.
Let’s take a look at person_details.rptdesign, an existing Maximo report by IBM, that has been accessed via a 7.5 Maximo Server. I chose this report as it has just one added user prompt, Person ID.
The Story behind this report is to display all Assets, Contracts, Tickets or Work Orders that the selected person is assigned to. This is shown by utilizing multiple sub-tables within the primary summary table listing information coming from the Maximo person table. If you look at the layout of the report, each sub-table maps to a DataSet.
The first step is to add the Parameter, this can be done under the Data Explorer or Outline view. It is here you will define the prompt for the user as well as the type of data you are expecting to receive. This parameter was defined as a String value that will be provided via a Text Box.
Technically there are a few ways you could use the Person ID that the user will provide to refine the report, such as a filter or a visibility rule. But the most effective, or rather most efficient one is utilized in this report, it is applied at each DataSet level. Let’s take a look at a portion of the open event of the first DataSet, assetdetail:
You can see where BIRT is going to replace the ? with the provided Person ID in the where clause. But it can be used against multiple fields. For example, here is the workorders DataSet open, in this DataSet it will compare against 3 fields; the owner of the workorder, who it was reported by or on behalf of:
One of the biggest mistakes I see people try to do when they are new to BIRT report building is try to accomplish too much too fast. This report is a good example of creating a robust report in smaller and much more manageable pieces. Using a default parameter value you would have the ability to run each DataSet individually to troubleshoot any potential scripting issues.
Like I often mention in my BIRT for Maximo class or rather any of my BIRT classes, BIRT reporting can seem a bit daunting when you first start out, until you break it down into 4 manageable processes
- Story
- Data
- Layout
- Formatting
If you haven’t taken my class or would like to get additional help, please visit our website for more information.
Comments