kurian123 Posted June 10, 2009 Share Posted June 10, 2009 I want to display three reports in each page...Right now I am including these three reports as 3 sub reports..in three group headers..Now it is printing after completion of one report next one ...My problem is how display 10 rows of each record..in each pageall three record are not equal in size. Please help me.... Link to comment Share on other sites More sharing options...
nikunj321 Posted June 12, 2009 Share Posted June 12, 2009 You can set page height option in report properties to optimum and check the output Link to comment Share on other sites More sharing options...
kurian123 Posted June 13, 2009 Author Share Posted June 13, 2009 Thanks for your reply.. Sorry I reduced my subreport page height to 200 , still it is printing first report in full length .. And after the completion of first one second one is starting..... But i need to print 10 rows of each record in each page..... Please help me.... Link to comment Share on other sites More sharing options...
nikunj321 Posted June 15, 2009 Share Posted June 15, 2009 You can try keeping subreports aligned adjacent to each other from left to right and maximizing main reports width and minimizing main report's page height... Link to comment Share on other sites More sharing options...
kurian123 Posted June 16, 2009 Author Share Posted June 16, 2009 Thanks for your reply... But i need reports one after another ( 3 rd will come under 2nd, 2nd will come under 1st) and print 10 rows of each record in every page..(In a single page 10 rows of each records i need to show..if records count exceeds the same format will be continue in second page and so on..) please specify how to set break condition for the reports... Please help me.... Link to comment Share on other sites More sharing options...
mdahlman Posted June 16, 2009 Share Posted June 16, 2009 kurian123, It sounds like you may need to create a group to get what you want. It's hard to know exactly how it should be setup in your case. But the idea would be to create a group based on the row number divided by 10. Probably using integer division of (REPORT_COUNT - 1) / 10, so the first 10 items are in group1, the next 10 are in group2, etc. Then in the group header or footer you can place the 3 subreports. This way each group contains 10 rows (well, the last group could contain less). That leaves lots of details to be figured out... but I think the idea should work for you. Regards,Matt Link to comment Share on other sites More sharing options...
kurian123 Posted June 17, 2009 Author Share Posted June 17, 2009 Thank You Matt for your response, But it is not working..Let me explain the scenario..I have 3 reports1) PackageDetails.jasper 2)ConatinerDetails.jasper 3)PaymentDetails.jasperI am passing 3 Data Sources for these 3 reports likeJRDataSource jdsPackage = new JRBeanCollectionDataSource( packageDetailsList);JRDataSource jdsContainer = new JRBeanCollectionDataSource( containerDetailsList);JRDataSource jdsCharges = new JRBeanCollectionDataSource( paymentDetailsList);and passing these DataSource values through Parameter Map of Main Report like…reportParameterMap.put(FieldNameConstants.PACKAGE_DATA_SOURCE, jdsPackage);reportParameterMap.put(FieldNameConstants.CONTAINER_DATA_SOURCE, jdsContainer);reportParameterMap.put(FieldNameConstants.PAYMENT_DATA_SOURCE1, jdsCharges);And passing through main report liketry { responseByte = JasperRunManager.runReportToPdf(contextPath + JASPER_PATH, reportParameterMap, jdsPackage);} catch (Exception e){ e.printStackTrace(); }Now I want to display N lines (Say 10 lines)of PackageDetails, N lines of ContainerDetails and N lines of PaymentDetails in MainReport in each page….If report count exceeds it has to print in next page as in same format…Can you plese help me……Post Edited by at 06/17/2009 08:25Post Edited by at 06/17/2009 08:27 Link to comment Share on other sites More sharing options...
kurian123 Posted June 17, 2009 Author Share Posted June 17, 2009 I am sorry Matt, It is working.... Only one problem.. If the first subreport is not having 10 records the space is blank..(It keeps the place for 10 records)...Only in first page.... Can you please provide a solution for this.... All otherthings works fine... Thank You Very Much...... Link to comment Share on other sites More sharing options...
mdahlman Posted June 17, 2009 Share Posted June 17, 2009 kurian123, Maybe in the main report you have the subreports' height set too large. You may have made them large enough for 10 rows. But actually the subreport will expand to handle the rows. So think of the subreport's height as a minimum height rather than the final height. So if you set the height for each subreport element in the main report to be only the height of one row, then it should display what you want. Don't forget to set the second and third subreport elements to "Float" so they get pushed down as the items above expand. Regards,Matt Link to comment Share on other sites More sharing options...
kurian123 Posted June 19, 2009 Author Share Posted June 19, 2009 Hi Matt, Thanks for your replay, I tried in that way..but the top report is printing behind lower one The lower report is not going down...so it is overlapping...so what to do? I am putting all sub reports in same Group Header.... And I am giving the page break condition for each sub report in its on report by creating group header in each sub report.. One more problem I am facing..I am showing this report as PDF in browser...Generating byte stream and writing to Servlet response..And showing it as Attachment In my local deployment and Testing Deployment it works fine in all browses... But from production server it is not possible to open the attachment but it is possible to save and open The error is "...File can not found" Only in IE6 in Mozilla it works fine..but our client is using IE6.. Can you please provide solution for these problems.. Thank you very much for your support and help... 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