wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes sub report not displayed. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "sub report not displayed." Watch "sub report not displayed." New topic

sub report not displayed.

lynn fann
Ranch Hand

Joined: Oct 15, 2006
Posts: 115
Im trying to generate the report in pdf format. The report consist of 2 sub report ( 1 sub report required values to be passed in, the other one does not required any values to be passed in)

When i generate the file, the subreport is not included. Below is my code and jrxml

Servlet codes:


Where have i gone wrong?
Martin Ronckevic

Joined: Dec 10, 2010
Posts: 1

add datasource parameter like this:

I know I am replying more than a year later, but somebody may find it helpful, as I would couple of minutes ago. Worked on jasperreports 3.7.0.

Martijn Verburg

Joined: Jun 24, 2003
Posts: 3274

Hi Martin, welcome to Javaranch and thanks for your answer!

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Alain Ramos

Joined: Oct 10, 2011
Posts: 1
Hi , another solution would be passing the subreport datasource as java.util.List and then create de JRBeanCollectionDatasource like the example below

<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{dsSub})]]></dataSourceExpression>

it works for me
Don't get me started about those stupid light bulbs.
subject: sub report not displayed.