Thursday 16 March 2017

Child Dataset in BIRT using Scripted Data Source | IBM Maximo

developing complex reports for Maximo requires a number of data sets in Birt sometimes. And definately every second dataset is a subset/or dependent of Main dataset. therefore every child dataset takes a parameter as input from MainDataSet.

for example;
A PO data set,
and a POLINE dataset, poline dataset takes PONUM as InputParameter from PO.

1. create a Paramter in PolineDataSet "Edit DataSet"
PONUM, String, Input, NULL
2. In Layout tab, draw table, and in Table Data Binding
a Click on DataSet Parameter Binding (b)
b Click Edit (b)
c type/select row["ponum"]
3. In PoLineDataSet's Open event (4 things)
i data source provider
ii dataset open
iii set query
iv Query Parameters

3(i) SetQuery:
we need to append our where class in (iii) set query part
sqlText = "select * from PO where ponum = ?";

don't forget to comment this line in child dataset "where " + param["where"]

3(ii) Query Parameter:
name first paramater in this line
polineDataset.setQueryParamterValue(1,inputParams["ponum"]);

No comments:

Post a Comment