[ajug-members] iReports and Jasper

Jeff Mitchell jeff_mitchell at hotmail.com
Wed Aug 15 10:49:41 EDT 2007


I figured this out after reading deep deep into the JasperForge forum.  The issue is this, when you create a subreport on the master the subreport icon properties has several tabs, one of the tabs has the "Use data source expression" this is where I had coded the datasource for the sub: 
 
In Jasper Report:
new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource (PDFactory.generateCollection("CommGen")
 
now this works fine as I said on my local.  But what the forum said was to create a new Parameter for the master and in my Java code set the parm with the same code:
 
In Java:
report.setDs(new JRBeanCollectionDataSource(PDFactory.generateCollection("CommGen")));
 
That was it!  It is the same code going to the same place, I just needed to code it in java instead of the Jasper Report. 
That is why I was having a hard time finding it, as the mantra says "It should have worked..."
Might be a bug in Jasper.....
 
I went into detail on this incase anyone else had the same issue.
 
Thanks for the help


Date: Tue, 14 Aug 2007 23:27:27 -0400From: alex.x.zhang at gmail.comTo: ajug-members at ajug.orgSubject: Re: [ajug-members] iReports and JasperJeff,Are you sure that you copied the subreport jasper files to the new machine? In iReports, it compiles all your reports to an output folder and loads compiled subreports from there. When you deploy your reports, you have to make sure that subreports are compiled into .jasper files and named correctly. Alex
On 8/13/07, Jeff Mitchell <jeff_mitchell at hotmail.com> wrote: 


Hello all, I have problem that I am hoping the collective minds of AJUG can solve.  I am using iReports 2.0.0 and Jasper 1.3.4.  I have created a report that has three subreports, one of the subreports hits a database, the other two JavaBean Collections.  Now when I run these on my local pc all is well.   But when I move the reports to another pc (web server or coworker development pc) the two subreports that use collections are not showing up.  Again they work on my local pc but not when I move them to another pc.   I have tried and looked at all the paths but nothing is working.  Does anyone have any experience with iReports that can help me?
 
Thanks.
 
Jeff

Messenger Café — open for fun 24/7. Hot games, cool activities served daily. Visit now._______________________________________________ajug-members mailing listajug-members at ajug.orghttp://www.ajug.org/mailman/listinfo/ajug-members
_________________________________________________________________
See what you’re getting into…before you go there
http://newlivehotmail.com/?ocid=TXT_TAGHM_migration_HM_viral_preview_0507
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ajug.org/pipermail/ajug-members/attachments/20070815/b2bca0d7/attachment.html 


More information about the ajug-members mailing list