Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
SEAM BIRT Integration
GPret
Hi<br />
<br />
I have a report that uses a Scripted DataSource in a SEAM web application.<br />
<br />
When I embed my report like this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><ui:define name="body">
<rich:panel>
<b:birt designType="embed"
designName="/report/register_entries.rptdesign" embeddable="true">
<b:param name="reportTitle" value="Register Entries" />
</b:birt>
</rich:panel>
</ui:define></pre>
... the report runs fine. Report.initialize() as well as open() and fetch() methods are called.<br />
<br />
When I try to use the frameset viewer, or try to use designType=run to create pdf/xls like this: <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><b:birt xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:b="http://jboss.com/products/seam/birt"
designType="frameset"
designName="/report/register_entries.rptdesign"
title="Register Entries Frameset Report">
</b:birt></pre>
<br />
and <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><b:birt xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:b="http://jboss.com/products/seam/birt"
designType="run"
format="pdf"
designName="/report/register_entries.rptdesign"
title="Register Entries PDF Report"/></pre>
<br />
... Report.initialize() is called, but open() and fetch() on the Scripted DataSet are not invoked.<br />
<br />
Does anyone have any idea why this is happening? <br />
<br />
Thanks.
Find more posts tagged with
Comments
JasonW
Is your scripted datasource calling an external class? Does it work without a scripted datasource(ie a jdbc datasource like the sample db)?
Jason
GPret
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="80878" data-time="1312214422" data-date="01 August 2011 - 09:00 AM"><p>
Is your scripted datasource calling an external class? Does it work without a scripted datasource(ie a jdbc datasource like the sample db)?<br />
<br />
Jason<br /></p></blockquote>
<br />
Hi Jason<br />
<br />
Thanks for the quick response. I've just tested it with a JDBC connection and it works for both use cases. Revisiting the dataset methods, I can now see that they are being invoked but that my data access object is not accessible when trying to export to pdf. I've been accessing it as follows, utilizing a SEAM session bean: <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportDataProvider = Packages.org.jboss.seam.Component.getInstance("reportDataProvider", true);</pre>
<br />
I'm not sure what differs to make it visible in the one case and invisible in the other case.
JasonW
You may need to post this on a JBoss forum, but have you tried:
importPackage(Packages.org.jboss.seam);
var reportDataProvider = Component.getInstance("reportDataProvider", true);
Are you getting any log info?
Jason
GPret
Hi Jason.
Tried that and does not affect behaviour of either use case. Nothing in the logs.
Until now I've had my share of errors either embedded in the report itself or in the logs. This just fails silently.
I'll try the JBoss forums. Thanks for the help.
JasonW
It is looking like this org.jboss.seam.Component is either not in the classpath or the instance of this reportDataProvider is not found. Can you check its value after the call? Ie
if( reportDataProvider == null ){
importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/temp/birtjboss.txt", true ) );
out.println( "reportDataProvider not found");
out.close();
}else{
importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/test/pgevents.txt", true ) );
out.println( "report data class "+reportDataProvider.getClass().toString());
out.close();
}
Jason
GPret
Hi Jason
Got assistance on JBoss forums. Added <web:context-filter regex-url-pattern="/run|/frameset"/> to my components.xml file and it's working.
Finally have a fully integrated BIRT installation in my SEAM application (using scripted datasources).
Thanks for the assistance.
JasonW
If you write this up let me know.
Thanks
Jason