rvijaysubs Posted October 22, 2009 Share Posted October 22, 2009 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 reportPage3.jrxml - First subreportPage4.jrxml - Second subreportRegards,Vijay. Link to comment Share on other sites More sharing options...
jmartens Posted October 22, 2009 Share Posted October 22, 2009 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".JamesCode: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 More sharing options...
rvijaysubs Posted October 23, 2009 Author Share Posted October 23, 2009 Thanks jmartens. Thanks a lot. It worked.Warm regards.Vijay. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now