Hi,
I have a problem with the drill through report. I already search in the forums but I didn't find a way to solve my issue.
I have 2 report. I master report with a drill through link to a detailed report.
1. In the designer, it works. From the master report, I can display the detailed report
2. I install a tomcat server and configure the Birt Viewer. Then I copy my 2 reports and test it. It works again. The generated link in my browser is:
http://futuna:8080/birt-viewer/frameset?__report=report/OfferByVersionDetails.rptdesign&__format=html&IDVersion=SEN_HQ&StartDate=2012-02-01&__overwrite=true&__locale=fr&__svg=false&__designer=false&__pageoverflow=0&__masterpage=true
3. Then, I develop a web application that display with success the master report. Then, when I click on the link, it does not work. The behavior is the same in test mde in eclipse or deployed in my tomcat server. The displayed url is:
http://futuna:8080/metis_rm/?__report=/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%207.0/report_templates/Report/OfferByVersionDetails.rptdesign&IDVersion=[SEN_HQ]&StartDate=[2011-10-16]&__overwrite=true
Several things are different:
- the path to the detailed report (C:/Program Files/...)
- the [ ] in the parameter value.
I use birt 2.6.2 on windows. I develop with STS and grails 1.3.6.
I must admit that I am not really sure of my configuration because I copy into the lib folder of my sts project all the jar of the birt engine and in the code I set :birtConfig.setBIRTHome(C:/birt-runtime-2_6_2/ReportEngine);. Maybe I use 2 times the same library at different location but I assume it is not so important in my problem.
My code is basically :
EngineConfig birtConfig = new EngineConfig();
birtConfig.setBIRTHome(C:/birt-runtime-2_6_2/ReportEngine);
birtConfig.setLogConfig("BirtLog", Level.FINE);
Platform.startup(birtConfig)
IRenderOption options = null;
IReportEngine engine = null
IReportEngineFactory factory = (IReportEngineFactory)Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
engine = factory.createReportEngine(birtConfig);
dashboards.each { dashboard ->
IReportRunnable design = null
design = engine.openReportDesign("report_templates/OfferByVersion.rptdesign")
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
//Parameters parsing
IGetParameterDefinitionTask taskparam = engine.createGetParameterDefinitionTask(design);
Collection reportParams = taskparam.getParameterDefns(true);
reportParams.each { parameter ->
task.setParameterValue(parameter.getName(), paramDefaultValue);
}
task.validateParameters();
options = new HTMLRenderOption();
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);
options.setEmbeddable(true)
options.setImageHandler(new HTMLServerImageHandler())
options.setSupportedImageFormats("PNG;GIF;JPG;BMP;SWF;SVG")
options.setBaseImageURL("
http://futuna:8080/metis_rm/report_images/")
options.setBaseURL("
http://futuna:8080/metis_rm/")
options.setImageDirectory("web-app/report_images")
options.setOutputStream(out)
task.setRenderOption(options);
task.run();
task.close();
}
engine.destroy();
Platform.shutdown();
Thanks for your help!
Best Regards,
C?dric Christinaz