Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Unable to access nested value in Scripted data set
Migrateduser
Hi I am new to BIRT. I am using scripted dataset to access my values.
I am using Birt designer version 3.7.1.
Here is my code for the Open script and Fetch script of the data set.
//Open script
importClass(Packages.com.tcs.aov.dao.AovDAOImpl);
aovd = new AovDAOImpl();
//logToDebugWindow() is javascript function to debug my script.
logToDebugWindow("Open");
aovd = new AovDAOImpl();
if(aovd != null)
{
logToDebugWindow("aovd is not null");
}
else
{
logToDebugWindow("aovd is null");
}
aovAovData = aovd.getFirstPanelDetail("2011-06-01","2012-05-01","Monthly",null,null,"no");
if(aovAovData != null)
{
logToDebugWindow("aovAovData is not null");
}
else
{
logToDebugWindow("aovAovData is null");
}
aovlist = aovAovData.getBarAovList();
if(aovlist != null)
{
logToDebugWindow("Fetch aovlist is not null");
}
else
{
logToDebugWindow("Fetch aovlist is null");
}
count = 0;
//Open script end
// Fetch Script
if(aovlist != null && count < aovlist.size())
{
row["total_revenue"]=aovAovData.getBiTotalRevenue();
row["total_orders_count"]=aovAovData.getBfTotalOrdersCount();
row["total_aov"]= aovAovData.getBiTotalAov();
row["GRAND_TOTAL"]= aovlist.get(count).getBdGrandtotal();
row["TOTAL_ORDERS"]= aovlist.get(count).getBdTotalorders();
row["DATE_FROM"]= aovlist.get(count).getBdtDateFrom();
count++;
return true;
}
return false;
// Fetch Script end
When I preview results in the "Edit dataset" window, its working fine and fetching me results.
But when I preview the rptdesign file itself, its not working.
From debugging I found that "aovlist" becomes null for some unknown reason while previewing rptdesign file. Can anyone help me please???
aovAovData is an object having the following properties
1.An arraylist i.e "aovlist"
2.An int i.e. biTotalRevenue
3.A float i.e. bfTotalOrdersCount
4.An int i.e. biTotalAov
Find more posts tagged with
Comments
There are no comments yet