harishsundaram Posted July 30, 2006 Share Posted July 30, 2006 Hi I am new to jasper reports and am currently struggling with sub-reports. I'm using jasper reports 1.2.4 I have a master report with more than 20 sub-reports. However, I'm not able to make each sub-report start on a new page. How do I make sure that each sub-report starts on a new page? Thanks in advance,~Harish Link to comment Share on other sites More sharing options...
teodord Posted July 31, 2006 Share Posted July 31, 2006 Hi, You could put each subreport in its own band by using the group header sections of 20 dummy groups that break with every record and have minHeightToStartNewPage big enough so that the each group always starts on a new page. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
harishsundaram Posted July 31, 2006 Author Share Posted July 31, 2006 Hi, Thanks for the quick reply. It does solve my problem :-)It's interesting how a dummy group can solve this although there's nothing to group. Thanks again,~Harish. Link to comment Share on other sites More sharing options...
firass88 Posted November 26, 2009 Share Posted November 26, 2009 Somebody could please give me an example about dummy group and subreports that is working ! i am struggling with this two days and i am very frustrated.please help with a simple example ... thanks a lot. Link to comment Share on other sites More sharing options...
teodord Posted November 30, 2009 Share Posted November 30, 2009 Hi, In this particular case, what we call dummy group is actually a group that breaks with every record. Such a group, would print its header and footer with every record in the data source, thus giving you more bands to leverage as detail.A group that breaks with every record has to have a group expression that changes with every record.This is such an expression: <groupExpression>$V{REPORT_COUNT}</groupExpression> I hope this helps.Teodor Link to comment Share on other sites More sharing options...
firass88 Posted December 1, 2009 Share Posted December 1, 2009 hi teodord,first of all thank you for replying to me, i want to describe to you my problem, i have a JRBeanArrayDataSource that i move it to the report, this array contain details, for an example, let's say for a school's teachers and students: name , telephone and type (student or teacher). so i want to print in a table(band) all the teachers then after that all the students! (it's just an example):this is the teacher's of this school:A # B #...this is the student's list:s #b #===============================================================================now i try different idea's But i couldn't succced,1. i think may i use groups to do so but because group need Order by in sql and i don't have an sql - am moving JRBeanArrayDataSource to ReportDataSource.2. i thought i can use one main report and one subreport but then i face the same problem the subreport print all the students alone but the some of the teachers is printed before and after the subreport.(why?) , i have tried to use two group footer but i face the same problem.3. i think about using one empty main report and using two sub-reports but i face another problem that the subreports is printed on each other - i try using the "dummy group" with <groupExpression>$V{REPORT_COUNT}</groupExpressionbut i don''t know what i did wrong. please help me ASAP!thanks in advance. Link to comment Share on other sites More sharing options...
firass88 Posted December 2, 2009 Share Posted December 2, 2009 i have solve my problem by using a regular group - idea1 , i need to sort my JRBeanArrayDataSource before giving to the report.i will be very gratefull if somebody can post an example for a dummy group! with two subreports. 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