It's all about the answers!

Ask a question

BIRT script report return empty result


pugazhenthi samidurai (26423742) | asked Feb 17 '12, 1:17 a.m.
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

One answer



permanent link
Rafik Jaouani (5.0k16) | answered Feb 18 '12, 7:56 p.m.
JAZZ DEVELOPER
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();

Your answer


Register or to post your answer.