Integrate BIRT 4.2.1 with JSF 2.0https://www.eclipse.org/forums/index.php/mv/msg/397100/937754/#msg_937754
We are busy investigating all possible open source solutions for our reporting engine needs. BIRT seemed perfect except that we are unable to integrate it with our JSF 2.0 GUI. I have googled and found jsf4birt but the library does not seem to support JSF 2. Also busy looking at jboss-birt-servlet.jar but have not had any success.

In essence, any suggestions/help on this matter will be highly appreciated? Is there anyway to integrate BIRT with JSF 2.0 and where can I find more information on how to accomplish this? Surely this can not be too difficult?

Jason]]>Jason Weathersby2012-10-09T18:48:14-00:00Re: Integrate BIRT 4.2.1 with JSF 2.0https://www.eclipse.org/forums/index.php/mv/msg/397100/942328/#msg_942328
Thank you for replying. I have started reading about the tag library and will try to implement it immediately. It sounds perfect. I will let you know if I run into any problems, hoping it is as simple as it sounds?

Am I suppose to download them from somewhere or are these old jars? I'm using BIRT 4.2 right? I could find a viewservlets.jar for instance not a viewerservlets.jar. and the com.ibm.icu jar in the WebViewerExample/WEB-INF/lib/ folder of the BIRT Runtime package. Also what should the namespace def be for the taglib in my facelet? Do I need anything specific in my web.xml file?]]>Izaak van Niekerk2012-10-13T12:59:46-00:00Re: Integrate BIRT 4.2.1 with JSF 2.0https://www.eclipse.org/forums/index.php/mv/msg/397100/942420/#msg_942420
1. added all runtime libs in my app (from WebViewerExample WEB-INF/lib folder).
2. web.xml:

When I deploy the application on Glassfish, I don't see any errors, but unfortunately I don't see any viewer or report either. I only see my primefaces components.

What am I missing?]]>Izaak van Niekerk2012-10-13T13:38:53-00:00Re: Integrate BIRT 4.2.1 with JSF 2.0https://www.eclipse.org/forums/index.php/mv/msg/397100/946283/#msg_946283
https://bugs.eclipse.org/bugs/show_bug.cgi?id=367192
A couple of options. One is to deploy the viewer to a separate web app and then use url integration to the birt viewer app. Another option alluded to in the bug is to use the h:outputText taghttp://www.mkyong.com/jsf2/jsf-2-outputtext-example/
Download the runtime for birt 4.2 add all the jars in the report engine/lib directory to your webapp classpath and then call the Report Engine API to create and render the report in HTML.

If you use this approach make sure to only startup the platform once when your app starts up. Shut it down when your app is closing. Wrap access to the engine creation code in a singleton and create a new task with the engine for every report request. Also make sure to close the task when the report is complete.

Jason
]]>Jason Weathersby2012-10-16T04:40:59-00:00Re: Integrate BIRT 4.2.1 with JSF 2.0https://www.eclipse.org/forums/index.php/mv/msg/397100/947538/#msg_947538
thank you for the detailed information and help! I finally got it working! BIRT on a JSF 2.0 facelet
But it's only a prototype at the moment, so obviously need to still look at your suggestions of starting and stopping the engine within the application.

On another note, the report came back with quite a significant amount of data without any pagination resulting in the browser becoming almost unresponsive. Is there an easy way of automatically restricting the amount of records displayed with a sort of next, previous type navigation around the report data? And as for the save as pdf and excel buttons etc, I take it I need to build those myself and simply change the output format to PDF for example?]]>Izaak van Niekerk2012-10-17T07:09:34-00:00Re: Integrate BIRT 4.2.1 with JSF 2.0https://www.eclipse.org/forums/index.php/mv/msg/397100/949348/#msg_949348
engine = factory.createReportEngine( config );

Jason]]>Jason Weathersby2012-10-18T23:22:27-00:00Re: Integrate BIRT 4.2.1 with JSF 2.0https://www.eclipse.org/forums/index.php/mv/msg/397100/956153/#msg_956153
This is so helpful. Will try and implement either and let you know how it went!