Jump to content

multiple subreports generating one after the other


rvijaysubs

Recommended Posts

Hi,

I have a master report with multiple subreports. The master report has a query which passes the ORDER_IDs of a particular Resident to all the subreports. I want the first subreport to generate data completely (for all ORDER_IDs of that resident) and then move on ot the next subreport.

I searched the forum and found this post. In the post, jmartens suggested to make the Position Type to float but that did not help. Is there any other way to generate the subreports as intended?

I have attached the files for your reference.

testReport.jrxml - Master report
Page3.jrxml - First subreport
Page4.jrxml - Second subreport

Regards,
Vijay.

 

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi Vijay,

I got your request for help, so I took a quick look at your report templates.  You just need to add another layer of subreports to your situation so it processes like this <see code sample>

This way the "preprocessor" subreports will call your order-level subreports iteratively, so all the "Page3" reports are produced for every ORDER_ID, before all the "Page4" reports are produced. 

I hope that helps!  Don't forget to set the relative positioning to "float".

James

Code:
Master Report (don't you want to receive Resident_ID as a parameter?)    // write query so only a single record is returned for this resident id    Select distinct resident_id from LTD_ORDER where resident_id = $P{P_RESIDENT_ID}    <in the detail band>        Call new subreport Page3_Preprocessor passing resident_id            // its query gets all orders for that resident            Select ... from LTC_ORDER where resident_Id = $P{P_RES_ID}            <in the detail band>                Call subreport Page3 exactly as you currently are calling it.        Call new subreport Page4_Preprocessor passing resident_id            // its query gets all orders for that resident            Select ... from LTC_ORDER where resident_Id = $P{P_RES_ID}            <in the detail band>                Call subreport Page4 exactly as you currently are calling it.            
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...