BIRT script report return empty result
Hi ,
i have followed the Story Points report for developing script report.
i have Created the Data set (Development)for retrieving data from LIVE_WORKITEM_CNT table. And created another data set (script data set).
check my development process below.
1. i have added the following code into Report initialize method
importPackage(Packages.java.util);
Development = [];
2. Added the following code in Development dataset onFetch method
if (typeof(Development) == "undefined") {
return;
}
var point = new Object();
point.wiid = row;
//point.summary = row;
//point.witype = row;
//point.wicount = row;
Development.push(point);
3. Then added the below code into fetch method of scripted data set.
if (Development.length == dataSetIndex) {
return false;
} else {
var DevData = Development;
dataSetIndex++;
row = DevData.wiid;
//row = DevData.summary;
//row = DevData.witype;
//row = DevData.wicount;
return true;
}
and dataSetIndex = 0; on open method.
4. finally i have inserted the dataset columns into report layout.
while running preview its shown empty results.
Kindly help on this. i am searching more than 4-6 days.
Thanks
Pugazh
i have followed the Story Points report for developing script report.
i have Created the Data set (Development)for retrieving data from LIVE_WORKITEM_CNT table. And created another data set (script data set).
check my development process below.
1. i have added the following code into Report initialize method
importPackage(Packages.java.util);
Development = [];
2. Added the following code in Development dataset onFetch method
if (typeof(Development) == "undefined") {
return;
}
var point = new Object();
point.wiid = row;
//point.summary = row;
//point.witype = row;
//point.wicount = row;
Development.push(point);
3. Then added the below code into fetch method of scripted data set.
if (Development.length == dataSetIndex) {
return false;
} else {
var DevData = Development;
dataSetIndex++;
row = DevData.wiid;
//row = DevData.summary;
//row = DevData.witype;
//row = DevData.wicount;
return true;
}
and dataSetIndex = 0; on open method.
4. finally i have inserted the dataset columns into report layout.
while running preview its shown empty results.
Kindly help on this. i am searching more than 4-6 days.
Thanks
Pugazh
One answer
Looks like you did things the right way but the devil is in the details. I will need to see the full report design to see why it is not working. Things to check:
Make sure the non scripted data set gets fetched by dropping it on the report design surface or you can bind it to a dynamic text item and add the following javascript to the dynamic text item: Total.count();
Make sure the non scripted data set gets fetched by dropping it on the report design surface or you can bind it to a dynamic text item and add the following javascript to the dynamic text item: Total.count();