Jump to content

How to create Multiple subreports


ssa_sbobba

Recommended Posts

How to create multiple subreports?

 

I tried to create multiple subreports,but it displaying the last report only?

 

My Requirement is:

i want to display all subreports details one after another.

 

 

In which section i have to declare the <subreport>

I have uploaded StateCount.jrxml file

In that file, i have defined two sub reports(Webhitmapping and State),if i run that report it is displaying the State details only, it is not displaying first sub report details.

 

//Java Code

JasperCompileManager.compileReportToFile("statecount/StateCount.jrxml");

JasperCompileManager.compileReportToFile("statecount/WebhitMapping.jrxml");

JasperCompileManager.compileReportToFile("statecount/State.jrxml");

Map params = new HashMap();

Document document = JRXmlUtils.parse(new File("statecount/StateCount.xml"));

params.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, document);

params.put(JRXPathQueryExecuterFactory.XML_LOCALE, Locale.ENGLISH);

params.put(JRParameter.REPORT_LOCALE, Locale.US);

JasperFillManager.fillReportToFile("statecount/StateCount.jasper", params);

JasperExportManager.exportReportToHtmlFile("statecount/StateCount.jrprint");

 

Please help,

Thanks

[file name=StateCount.jrxml size=4910]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/StateCount.jrxml[/file]

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I tried with these options

 

1. I have kept both subreports in detail section

2. I have kept one report in detail and one report in summary section.

 

But no use..

 

Please tell, how to display multiple sub reports.

Post edited by: ssa_sbobba, at: 2007/05/23 13:36

Link to comment
Share on other sites

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...