Monday, May 4, 2015

BIRT Pass Parameters from Parent to Child Dataset in Maximo

In BIRT,  we used to pass the values from parent to child data set for Reporting requirements.There are two methods on achieving it.

1.  Pass input parameter from parent to child data set

When ?
This method can be used, if you have nested parent-child relationships, for example, Workorder --> Hazards --> Precautions.
Workorder -> Multi Asset Locations CI-> Assets

Where  ?
In this method, we add a parameter to child data set from Data Explorer section.
In the edit data binding of the child data set, pass on the value for this parameter from parent data set.

Add this line to set the parameter to the SQL query.
inventoryDataSet.setQuery(sqlText);
inventoryDataSet.setQueryParameterValue(1,inputParams["param1"]);

How ?
http://goo.gl/6Z0XXy

2. Use rows[0] keyword 
rows[0]["columnname"]

When ?
This method can be used, if you have 1 parent and many child data sets. 
WORKORDER -->  PLANNEDLABOR ; WORKORDER --> PLANNEDMATERIAL etc.,

Where ?
Use this keyword in the Open method of the child data set.

How ?
http://goo.gl/JV76kN

No comments:

Post a Comment