Home
Analytics
BIRT Report Engine vs Report Viewer
karthikr
Hi,
We are new to BIRT and will be using it for our reporting application. We plan to use Flex as our UI for accepting Report Parameters.
For our middleware, we use OSGI plugins , Our Flex UI will make use of the middleware for invoking BIRT. In this regard , I have a few questions
1) Can we use just the Report Viewer Plugin or do we need Report Engine Plug in as well ?
2) We cannot deploy Report Viewer as a separate application with web.xml, but are unable to start Report Viewer as an OSGi Plugin. Can someone point us in the right direction ?
3) We use Spring Framework and so we have all the Spring JARS in the target Platform, For BIRT if we just need Report Viewer can someone let us know what Jars we need to include in the target Platform.
Our basic approach is this
From Flex, Call a middleware Service passing all the parameters. This Middleware will then build the URL for BIRT Report Viewer (along with parameters and report Design File) and use it to render the report in the browser. Can someone validate this approach ? Alternative could be to build the URL from Flex itself. Also do we need to use Report Engine API's for this purpose.
Thank you very much
Find more posts tagged with
Comments
JasonW
1 - You can deploy the viewer as a plugin, but you will need the report engine and most of the other birt runtime plugins. This is what we do in the designer. You only need the viewer for the dependency list but most of the BIRT plugins are required to run the report (see 2). <br />
<br />
2 - You may want to take a look at these entries:<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/deploying-birt-reports/1061-birt-api-examples/#description'>BIRT
API Examples - Designs & Code - BIRT Exchange</a><br />
and<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/deploying-birt-reports/987-webinar-archive-deploying-birt-within-applications/#description'>Webinar
Archive: Deploying BIRT within Applications - Tutorials - BIRT Exchange</a><br />
<br />
3 - See 2. You can remove plugins you do not plan on using. For example xml datasource, pdf output, word output, chart engine, etc.<br />
<br />
Jason
JasonW
Example launch config attached for RCP application that contains viewer.
Look at selected_target_plugins
JasonW
Lets try that again :>
karthikr
Hi Jason,
Thank you very much for your replies. They were very helpful and very insightful. We investigated a little bit more today and were able to make progress. We realized the difference between the Birt Report Engine and Birt Report Viewer.
Just to Summarize our understanding,
Birt Report Viewer is an example of deploying Birt Report Engine on an RCP Application.
We are now able to deploy Report Engine as an OSGi Plugin and use the APIs to generate a report, We are then able to take the resultant output and display it on the browser by setting the MIME mapping and contentType.
We have basically included everything(all the BIRT JARS) in the target Platform for now, Would the Configuration that you attached in this post be enough for plugin dependencies on Report Engine.
Can you please let us know your thoughts on the same. ?
We are also having one issue of not getting the servlet Context Path using OSGi , so for testing purposes we have to hardcode the path of the report design files. We understand that using OSGi, we might have to manufacture our own Servlet Context. Can you throw light on this aspect as well ?
Thanks a lot for your help
JasonW
The viewer in plugin format or in war format both are examples of using the report engine api to run reports. If you just want the report engine download the birt runtime. In that download there is a ReportEngine directory that contains the birt runtime plugins. These are all that you should need in that case.
If the reports are in the plugin you are building why not just do this:
Bundle bundle = org.eclipse.core.runtime.Platform.getBundle("org.eclipse.birt.examples.rcpengine"/*yourplugin*/);
URL url = FileLocator.find(bundle, new Path("/reports/TopNPercent.rptdesign"), null);
String rpt = FileLocator.toFileURL(url).getPath();
design = engine.openReportDesign(rpt);
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
Jason