Im having trouble with some javascript in the onFetch step of a dataset in a BIRT report.
I've added logging in the i开发者_高级运维nitialise step of the report in a few different ways. The runtime im using is Tivoli Common Reporting, and they supply a logging framework. Its initialised as so
reportContext.setPersistentGlobalVariable("logfileName", "DateRangeParm.log");
setupLogging();
logInitialize();
debugLogger("Started logging in initialize step");
debugLogger("Date: " + new Date());
This works fine to log on the steps of the report(ie initialise, BeforeRender, AfterRender etc.) but I cant seem to log anything in the Dataset steps such as onFetch etc.
Ive also tried
importPackage(Packages.java.util.logging);
var fileHandler = new FileHandler("/tmp/birt.log", true);
var rootLogger = Logger.getLogger("");
rootLogger.addHandler(fileHandler);
as the BIRT instructions tell me to do in the BIRTFAQ
Once again this allowed me to log things in the main report (ie BeforeRender etc) but not in the dataset onFetch Step. Ive also tried putting the previous javascript into the onFetch and that didnt seem to work either. Its a bit of a mystery.
Im running Ubuntu 9.04. IBM java 1.5. Eclipse 3.5.0 and BIRT 2.5.1.
Any help would be great.
sounds like the onfetch method is not being called. Is your report returning data? And is the dataset used in the report design?
Just for kicks, try this logger
http://www.lebirtexpert.com/wordpress/2010/03/03/using-a-popup-debug-window/
There could be some runtime exception as i had a similar problem in beforeFactory() method, it threw exception and continued.
精彩评论