Jump to content
Changes to the Jaspersoft community edition download ×

Subreports parameter passing - again


2005 IR Help

Recommended Posts

By: Jeff - logicacmg

Subreports parameter passing - again

2004-05-03 00:10

I am having problems working out how to pass parameters to my subreport from Java when calling the Master report.

 

In Java i do the following:

1. Create the HashMap for the Master Report

2. Create the HashMap for the Child Report

3. Add parameter values to the Child report hashMap

4. Add parameter values to the Master report HashMap

5. Add the Childs HashMap to the Master HashMap

6. Add the Child JasperReport to the Master HashMap

7. Add the Child DataSource to the Master HashMap

8. Print/View the Report

 

The Child report is displayed inside the Master report, BUT the only values that came from the Child DataSource are present in the Child report. The values that were placed into the Child HashMap are NOT displayed.

 

I assume that the problem is around the use of the inbuilt REPORT_PARAMETERS_MAP. Does anyone have any sample for how to pass the Childs HashMap to the Child report (I assume this is what is not happening).

 

Thanks

Jeff.

 

 

 

 

 

By: Jeff - logicacmg

RE: Subreports parameter passing - again

2004-05-03 04:36

Does anyone have any sample sourcecode for how to pass parameters from Java to the subreport class through the master report?

 

Or are there any good HOWTO's available. I have been through the Sample Sourcecode (and it doesn't show it), and have purchased the JasperReports eBook, it doesn't help.

 

Any suggestions?

Jeff.

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