PDA

View Full Version : Incorporating BIRT report into Pentaho Demo



robbika
10-14-2006, 02:03 PM
I have created a report using BIRT 2.1 report designer and I would like to know how to put this into the Pentaho demo.

I understand that maybe I need the RC3 version of the demo from the SVN, but I am not sure.

Questions:

- do I need to use RC3 to display my report?
- if so how do I download and install RC3?

I have looked at the SVN repository and I can see under pentaho and pentaho-samples that it looks like it can handle BIRT but I don't know how to build the demo

- how do I add my BIRT report into the demo?

I would like to use JFreeReport but I found that BIRT had the features that I need that I couldn't find in JFreeReport. (Whether I can achieve the same results in JFreeReport will be another question.)

Thank you for your help.

mbatchelor
10-14-2006, 05:50 PM
For BIRT 2.1, yes, you'll either need to wait for RC3 (should be any day now), or download and build the code that's in SVN.

Take care,

Marc

robbika
10-15-2006, 01:29 AM
I would love to wait for RC3 but I don't have that luxury right now.

How do I build the code in SVN?
Can you point me to somewhere that tells me what I need to do to build the pentaho-demo enough to get it running on my server?

All I need is something like, checkout the blah blah subprojects, compile them and copy them into xyz kind of instructions.

After that, how to incorporate a BIRT report into the demo.
Has anyone written anything about that yet?
Searching on my part didn't bring up anything yet.

If I get some help with this I don't mind writing an article on how to do it for the benefit of the community.

mbatchelor
10-15-2006, 02:13 PM
Well, it's all pretty simple actually. Assuming you're starting with the RC2 PCI, do the following:

1- Get the pentaho, pentaho-solutions, pentaho-data, and pentaho-preconfiguredinstall projects from SVN. They all need to be siblings in the same base folder. Something like:

/pentaho-build/pentaho
/pentaho-build/pentaho-preconfiguredinstall
/pentaho-build/pentaho-data
/pentaho-build/pentaho-solutions

2- Create an override.properties file in the same folder as the pentaho/build.xml. This way, you can tell ANT where to find things the targets need. Here is what my override.properties looks like:



debug=false
# Override setting
java1.4.home=C:/j2sdk1.4.2_10
jre.dir=C:/j2sdk1.4.2_10/jre


3- Modify the build.xml to point to your javadoc executable. I haven't gotten Brian to make this change be settable from the override.properties file yet. So, I've had to change it myself. Here is what mine looks like:



<target name="javadoc">
<javadoc destdir="${javadoc.dir}/docs/api"
sourcepath="server/pentaho/src"
access="public"
use="true"
notree="false"
nonavbar="false"
noindex="false"
splitindex="true"
author="true"
version="true"
nodeprecatedlist="false"
executable="C:/j2sdk1.4.2_10/bin/javadoc.exe"
nodeprecated="false"
packagenames="org.pentaho.*"
excludepackagenames="org.pentaho.test.*, org.hibernate.*"
doctitle="Pentaho BI Platform">
<classpath refid="classpath" />
</javadoc>
</target>


Notice that the line "executable" has been added. Without this, the ant tasks don't generate the javadoc, and the task fails.

4- Use ANT to build the pentaho-dist target. There may be other little twiddles you have to do to the override.properties or the build.xml so that it works in your environment. But, for me, this is all I had to do on my XP system.

At this point, you should have the whole RC3 as distributables, including the whole PCI.

As for getting your BIRT report into a solution, the solution-building guide covers that. But, in short, you could just copy it, and your action sequence to the samples/reporting folder and it will automatically show up in the PCI.

Hope this helps,

Marc

robbika
10-15-2006, 02:31 PM
Thank you very much. I will try it out.

mbatchelor
10-16-2006, 10:41 AM
You know, it would be simpler for you to get our RC3 preview than it would for you to build it.

Go to http://community.pentaho.org/index.php and it will tell you how to download the latest (which has everything in it you're looking for) already built for you.

You can post issues for this in our RC forum.

Take care,

Marc

dmoran
10-16-2006, 10:44 AM
robbika,

There is another option if you don't want to build, you can use the nightly build since we are so close to RC3, it is very stable.

Anonymous FTP:
download.pentaho.org


Doug

robbika
10-17-2006, 07:20 AM
I followed your instructions but got this error to do with Jasper:



jsp_compile:
[jasper2] log4j:WARN No appenders could be found for logger (org.apache.jasper.JspC).
[jasper2] log4j:WARN Please initialize the log4j system properly.
[mkdir] Created dir: /opt/pentaho-demo-RC3/pentaho/build/pentaho-demo/jboss/server/default/deploy/jbossweb-tomcat55.sar/ROOT.war/WEB-INF/classes

BUILD FAILED
/opt/pentaho-demo-RC3/pentaho/build.xml:692: The following error occurred while executing this line:
/opt/pentaho-demo-RC3/pentaho/build/pentaho-demo/jboss/precompile.xml:50: The following error occurred while executing this line:
/opt/pentaho-demo-RC3/pentaho/build/pentaho-demo/jboss/precompile.xml:98: The following error occurred while executing this line:
/opt/pentaho-demo-RC3/pentaho/build/pentaho-demo/jboss/precompile.xml:42: taskdef class org.apache.jasper.JspC cannot be found

mbatchelor
10-17-2006, 10:37 AM
It almost sounds like the JSP compiler can't be found. You are using a JDK (and not a JRE), correct?

Assuming your demo will be deployed on a box running JBoss with a JDK (and not the JRE), then you can skip the whole JSP Compile thing. In the build.xml, you'll find this section:



<!-- for precompiled jsps - remove if it causes trouble -->
<ant antfile="precompile.xml" dir="${build.demo.dir}/jboss" inheritAll="false">
<!-- <property name="java1.4.home" value="${java1.4.home}" /> -->
</ant>


Just do what it says and comment out the block. I think everything else will still work, and the server (again, if you're using a JDK) will compile each JSP the first time it's encountered.

Take care,

Marc

robbika
10-19-2006, 09:54 AM
OK I got quite far in this, I make the report template, copied it to the server, made the xaction file using the example form the Pentaho 1.0 reporting solutions manual (nothing exists on BIRT in the 1.2 manual), restarted the server, and chose my report.

I get the attched error.

One question is how goes the Pentaho Demo know where the mysql data source is? Do I guess I have to set that up. Is that causing the error or is it something more fundamental?

I am using the latest BIRT design tool with BIRT 2.1.1 and Eclipse 3.2.6.
The system I am running is the Pentaho Demo RC3 build 471.



19:45:02,274 ERROR [BIRTReportComponent] Error Start: Pentaho 1.2.0 build 471 RC3
19:45:02,281 ERROR [BIRTReportComponent] 8733b76b-5f99-11db-8a92-4186d9da049e:COMPONENT:context-30073417-1161279894055:«»site_aquisition.xaction BIRT.ERROR_0007 - error running report samples/reporting/site_aquisition.rptdesign
org.eclipse.birt.report.engine.api.EngineException: The design file <stream> has error and can not be run.
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:204)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:179)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:156)
at org.eclipse.birt.report.engine.api.impl.ReportEngine.openReportDesign(ReportEngine.java:255)
at org.pentaho.plugin.eclipsebirt.BIRTReportComponent.executeAction(Unknown Source)
at org.pentaho.plugin.ComponentBase.execute(Unknown Source)
at org.pentaho.core.runtime.RuntimeContext.executeComponent(Unknown Source)
at org.pentaho.core.runtime.RuntimeContext.executeAction(Unknown Source)
at org.pentaho.core.runtime.RuntimeContext.performActions(Unknown Source)
at org.pentaho.core.runtime.RuntimeContext.executeLoop(Unknown Source)
at org.pentaho.core.runtime.RuntimeContext.executeSequence(Unknown Source)
at org.pentaho.core.runtime.RuntimeContext.executeSequence(Unknown Source)
at org.pentaho.core.solution.SolutionEngine.executeInternal(Unknown Source)
at org.pentaho.core.solution.SolutionEngine.execute(Unknown Source)
at org.pentaho.core.services.BaseRequestHandler.handleActionRequest(Unknown Source)
at org.pentaho.ui.servlet.ViewAction.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.pentaho.core.system.SystemStatusFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:534)
Caused by: Error.DesignFileException.INVALID_XML - 1 errors found!
1.) ( line = 0, tag = null) org.eclipse.birt.report.model.parser.DesignParserException (code = Error.DesignParserException.UNSUPPORTED_VERSION, message : The report file of version "3.2.6" is not supported.)

at org.eclipse.birt.report.model.parser.ModuleReader.readModule(ModuleReader.java:115)
at org.eclipse.birt.report.model.parser.DesignReader.read(DesignReader.java:86)
at org.eclipse.birt.report.model.core.DesignSession.openDesign(DesignSession.java:236)
at org.eclipse.birt.report.model.api.SessionHandle.openDesign(SessionHandle.java:196)
at org.eclipse.birt.report.engine.parser.ReportParser.getDesignHandle(ReportParser.java:131)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:199)
... 39 more
19:45:02,308 ERROR [BIRTReportComponent] Error end:
19:45:02,420 ERROR [RuntimeContext] 8733b76b-5f99-11db-8a92-4186d9da049e:RUNTIME:context-30073417-1161279894055:«»site_aquisition.xaction RuntimeContext.ERROR_0012 - ActionDefinition for org.pentaho.birt.BIRTReportComponent did not execute successfully
19:45:02,422 ERROR [SolutionEngine] 8733b76b-5f99-11db-8a92-4186d9da049e:«»SOLUTION-ENGINE:«»site_aquisition.xaction: SolutionEngine.ERROR_0007 - Action sequence execution failed

mbatchelor
10-19-2006, 10:19 AM
The error shows is this:

Caused by: Error.DesignFileException.INVALID_XML - 1 errors found!
1.) ( line = 0, tag = null) org.eclipse.birt.report.model.parser.DesignParserException (code = Error.DesignParserException.UNSUPPORTED_VERSION, message : The report file of version "3.2.6" is not supported.)

That's an exception thrown by BIRT saying that the BIRT designer you're using creates a newer version of the BIRT report spec XML (.rptdesign) than Pentaho has embedded.

What version of BIRT are you attempting to use?

robbika
10-19-2006, 10:34 AM
I added the mysql driver to JBoss but it made no difference.
This is what I get on the output page when I try to run my BIRT report:



Failed
Error: BIRT.ERROR_0007 - error running report samples/reporting/site_aquisition.rptdesign - org.eclipse.birt.report.engine.api.EngineException: The design file has error and can not be run. (org.pentaho.plugin.eclipsebirt.BIRTReportComponent)

Debug: Starting execute of samples/reporting/site_aquisition.xaction (org.pentaho.core.solution.SolutionEngine)
Debug: Getting runtime context and data (org.pentaho.core.solution.SolutionEngine)
Debug: Loading action sequence definition file (org.pentaho.core.solution.SolutionEngine)
Debug: SolutionRepository.DEBUG_FILE_PATH - getFile path=/opt/pentaho-demo/pentaho-solutions/samples/reporting/site_aquisition.xaction (org.pentaho.repository.filebased.solution.SolutionRepository)
Debug: Adding variable source request to parameter output-type (org.pentaho.repository.filebased.solution.SolutionRepository)
Debug: Adding default value of "html" to parameter output-type (org.pentaho.repository.filebased.solution.SolutionRepository)
Debug: Adding variable source request to parameter rp_zone (org.pentaho.repository.filebased.solution.SolutionRepository)
Debug: Adding default value of "Any" to parameter rp_zone (org.pentaho.repository.filebased.solution.SolutionRepository)
Debug: Adding variable source request to parameter rp_phase (org.pentaho.repository.filebased.solution.SolutionRepository)
Debug: Adding default value of "Any" to parameter rp_phase (org.pentaho.repository.filebased.solution.SolutionRepository)
Debug: audit: instanceId=1ee6a703-5fa0-11db-b76a-69db0aac4ec4, objectId=org.pentaho.core.runtime.RuntimeContext, messageType=action_sequence_start (org.pentaho.core.runtime.RuntimeContext)
Debug: SolutionRepository.DEBUG_FILE_PATH - getFile path=/opt/pentaho-demo/pentaho-solutions (org.pentaho.repository.filebased.solution.SolutionRepository)
Error: BIRT.ERROR_0007 - error running report samples/reporting/site_aquisition.rptdesign - org.eclipse.birt.report.engine.api.EngineException: The design file has error and can not be run. (org.pentaho.plugin.eclipsebirt.BIRTReportComponent)
Error: RuntimeContext.ERROR_0012 - ActionDefinition for org.pentaho.birt.BIRTReportComponent did not execute successfully (org.pentaho.core.runtime.RuntimeContext)
Error: SolutionEngine.ERROR_0007 - Action sequence execution failed (org.pentaho.core.solution.SolutionEngine)

Server Version 1.2.0 build 471 RC3

mbatchelor
10-19-2006, 10:45 AM
Maybe you didn't see my previous post. The Pentaho Pre-configured install ships with BIRT 2.1.0 integrated. If you're using a later version of the BIRT report designer, then the report version number will be too new for the incorporated report parser.

So, my previous question stands. What version of the BIRT report designer are you using to produce the BIRT report file (xxxx.rptdesign)? If it's newer than 2.1.0, you'll have problems incorporating the report into the Pentaho platform.

I hope this helps,

Marc

bamaer
10-19-2006, 11:04 AM
The error you're getting comes down to 'The design file has error and can not be run'.
This is thrown because you are using BIRT 2.1.1, Pentaho supports BIRT up to 2.1.0.

If you are not using any functionalities that were introduced in BIRT 2.1.1, you might want to try to open the *.rptdesign file in a text editor (for example the 'XML source'-tab in the BIRT designer), and replacing the version-attribute in the <report>-element (3rd line or so):

<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.6" id="1">
to
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.2" id="1">

Hope this helps,

Bart

robbika
10-19-2006, 11:19 AM
BIRT report designer I am using is 2.1.1.
The BIRT report runs nicely from the Eclipse report designer.

Which version of BIRT does Pentaho Demo RC3?

robbika
10-19-2006, 11:31 AM
I tried that and it got a bit further.

Now I get this error message:



rror: BIRT.ERROR_0007 - error running report samples/reporting/site_aquisition.rptdesign - java.lang.NoClassDefFoundError: org/eclipse/birt/report/engine/api/impl/SelectionChoiceComparator (org.pentaho.plugin.eclipsebirt.BIRTReportComponent)


Maybe I should fire up 2.1.0 and see if the report will convert into that format?

bamaer
10-19-2006, 12:05 PM
You're using a selection list in your report, right?

robbika
10-19-2006, 02:11 PM
I don't know what a selection list is.

My report has three parts in it.

One is a table that is grouped on a column but only the groups are shown, the item are invisible (I just want a count on the items in the categories from that column).

The main report is another table. That uses conditional formatting on the cells but otherwise is a normal table.

The third part of the report is a kind of crosstab report.
There I have 6 tables in rows. Each table is a summary of one column from the datasource. So horizontally there is a time dimension and the cells count the number of items that fall in that timeslot for that category.
This is probably the most sophisticated thing in the report. I use the BIRT Total.count() function with a filter to get the count I want.
Something like Total.count( row["tss_time"] == "-2W").

As far as I know the report should also work in BIRT 2.1.0. I will try it out and see.

robbika
10-19-2006, 03:34 PM
Actually loaded the report into BIRT 2.1.0 and after some messing around I managed to get it to work and save it, I assume in 2.1.0 format.
And I can run it in the eclipse report designer for BIRT 2.1.0.

When I put that report file into the pentaho demo, I get the exact same error, listed below.

Am I to assume then that Pentaho does not support the whole of BIRT 2.1.0?

Or is there something else going on?



Error: BIRT.ERROR_0007 - error running report samples/reporting/site_aquisition.rptdesign - java.lang.NoClassDefFoundError: org/eclipse/birt/report/engine/api/impl/SelectionChoiceComparator (org.pentaho.plugin.eclipsebirt.BIRTReportComponent)

robbika
10-19-2006, 03:44 PM
Is this something to do with parameters?

I have two combo boxes of parameters with fixed values.

These parameters are passed into the SQL query to do some filtering.

Is this the problem?

bamaer
10-19-2006, 09:11 PM
The problem is indeed about the combo boxes.
This type of parameter is not fully supported in Pentaho (yet!).

robbika
10-19-2006, 11:28 PM
I changed it to radio buttons and exact same problem.

Is any kind of input parameter supported?

robbika
10-20-2006, 12:19 AM
I changed to radio buttons and the same problem.
I am assuming that any kind of list will not work.
So I switched to simple text boxes.

Well this had better results. First problem is that no parameter page was shown. Instead it assumed the parameter defaults.

Then it took 20 minutes to render the display (I don't exaggerate) which usually takes less than a minute when viewing with the report designer. In fact it is still spitting out table rows slowly as I type.

Also all CPU and memory and most of swap were used for this. I am running a 1.5 Gb memory machine.

This table is still rendering even though it has max 3000 rows.

bamaer
10-20-2006, 02:34 AM
Let's say BIRT support in Pentaho is less than optimal ;-)
Because I had similar problems, I started working on better BIRT integration recently.
I'm afraid this won't be finished before the Pentaho 1.2 release.
Any help is welcome...