Scripted dataset with Birt 3.7.0 [message #694285] |
Fri, 08 July 2011 05:18  |
Eclipse User |
|
|
|
Hi,
I upgraded the birt engine on my application from 2.6.2 to 3.7.0.
I designed some reports with scripted datasets that worked fine under the 2.6.2 version. However, now that I have upgraded Birt to 3.7.0, all the fields retrieved through the dataset appear blank on the report.
Here is the code for the different event handlers.
open():
importPackage(Packages.com.xxxxxxxxx.yyyy.serverimpl.dao);
retriever = ReportDataRetriever();
details = retriever.getList("from MovementDeliveryDetail mdd where mdd.movement.id = '" + inputParams["deliveryId"] + "'");
iterator = details.iterator();
sum = 0
fetch():
if(iterator.hasNext() == false) {
return false;
}
var detail = iterator.next();
row["product"] = detail.getProduct().getFullName();
row["expirationDate"] = detail.getExpiryDateString();
row["price"] = detail.getUnitPrice();
var quantityBox = "0"
if (detail.getNbBoxes() != null)
quantityBox = detail.getNbBoxes() + " x " + detail.getNbUnitsPerBox();
row["nbBoxes"] = quantityBox;
row["nbUnits"] = detail.getNbUnits() + " unit(s)";
sum += detail.getNbUnits() * detail.getProduct().getPrice();
row["sum"] = sum + " " + detail.getDelivery().getCenter().getCurrency().getSymbol();
return true;
close():
details = null;
retriever = null;
iterator = null;
When I put breakpoints, in the different getters for example at delivery.getReceiptNumber(), the code stops. Do I need to change the way I bind the fields to a data element or a table?
EDIT : It's actually not working either with datasets connected to JDBC data sources, so most probably with no kind of dataset.
I read that reports designed under 2.6.2 version would still work under the 3.7.0 version. What am I missing?
Thanks for your help.
[Updated on: Fri, 08 July 2011 06:21] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03311 seconds