Jump to content
We've recently updated our Privacy Statement, available here ×

How to include Subreports in a 'no XML' envir


Recommended Posts

By: greg burgess - darthaspirat

How to include Subreports in a 'no XML' envir

2003-05-08 16:30

We're evaluating Jasper as a possible solution for our company and I'm trying to put together some performance tests. I'm doing this by creating the JasperDesigns in Java instead of with XML.

 

I'm having trouble figuring out how to combine subreports into a master report in this environment. Could someone please show me some code snippets at how to include subreports in a JasperDesign NOT in XML?

 

Thanks,

 

 

 

 

 

By: Teodor Danciu - teodord

RE: How to include Subreports in a 'no XML' envir

2003-05-10 12:14

 

Hi,

 

The JasperReports API you use to create report

templates programatically perfectly maps the

structure of the XML.

I know it is not well documented, but I'm sure much

of it is self-explaining.

 

There is no particular condition to meet when

adding subreport elements to a band.

You just have to figure out what you would write

in the XML and do the same settings using the API.

 

If you already have added text fields and other

types of elements to a report template using the

API, then with the subreports things should not

be very different.

 

I guess both the master report and the subreport

will be built programatically and will be compiled

into .jasper files.

Make sure that in the subreport expression you

use for the subreport element, you point

to the correct .jasper file that contains your

subreport template.

 

If you have a specific problem or error,

don't hesitate to ask.

 

Thank you,

Teodor

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...