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)
Importing dependent project to the scripted dataset
pJune
I have to maven projects A and B. Project B depends on A. I have a birt report with a scripted data source and data set.
This is what I have in the open method of my dataset:
importPackage( Packages.com.project.A );
data = new NameOfTheClass();
list = data.getList();
This is not working. I have also tried the following:
data = new Packages. com.project.A.NameOfTheClass();
list = data.getList();
It did not work either.
Can someone help me?
Thanks in advanced
Find more posts tagged with
Comments
mwilliams
Where are you placing your jar file? Is this deployed or in the designer that you can't get it to work?
pJune
It is in the designer. What jar file? I read that I had to place the java class that the scripted dataset is using in the eclipse/plugins/org.eclipse.birt.report.viewer_2.6.1.v20100913/birt/WEB-INF/lib folder.
Project B and A are in my workspace. I added project A to the project B pom file as a dependency.
Forgive me if I did not answer your question correctly. I am new working with scripted data sources and datasets.
Thanks for responding so quickly.
CBR
Have a look at this blog post:
http://birtworld.blogspot.com/2009/12/birt-designer-classpath-changes.html
It describes how to let BIRT know that the project your current report is located in depends on another Java project.
As far as i know there is currently no maven plugin that can build BIRT projects. If your report is not located in a report project (BIRT project reference can only be set for Eclipse project of nature Report Projects)or you don't want to do it manually to only option is to build jar your java dependencies as jar files and to deliver them with the report. At the report level you can put some jar files in the classpath prior to report excecution in designer (have a look at the resources tab in the report properties section)
CBR
BIRT doesn't currently use the normal eclipse project references. So when letting Eclipse know that A depends on B using Maven, this doesn't cause BIRT to know that A depends on B.
pJune
Do you know any way to println the script written in the data set. I want to trace the results and the error message is not very useful.
Thanks
pJune
Well, I think I had something else wrong; because, I tried adding again project A as a dependency in the pom file of project B and it worked! It's awesome that BIRT can recognizes dependencies in a maven project.
Thanks for your help and quick answers!
CBR
That's good to know. Do you use any BIRT specific Maven plugins?
pJune
No, I just use my Birt version 2.6.1 and my two maven projects. I have project A as a dependency in the pom file of B. I don't have it in the classpath of the project B or in the classpath of the ReportDesigner.
Hope it works for you