manshack_one Posted August 29, 2016 Share Posted August 29, 2016 I'm building a report that's a sign in sheet. I need to force the number of rows in the report to be equal to the capacity of the class (I have the class capacity as a field so I can reference it). How do I force the detail band to print blank rows equal to this number? For example: A class has a capacity of 20 students but only 10 have signed up. When the sign in sheet is generated it should include 10 rows with student data and 10 rows without to leave room for handwritten entries on the printed copy.I considered the print when expression but I'm not sure how to say "print rows until 'i' is equal to capacity like you would in a loop. Link to comment Share on other sites More sharing options...
kkriplani Posted August 30, 2016 Share Posted August 30, 2016 Hi,Using a "Page break" would help. In the default expression, use a field like;$V{REPORT_COUNT} == 10Regards,KKriplani Link to comment Share on other sites More sharing options...
hozawa Posted August 30, 2016 Share Posted August 30, 2016 JasperReports does not have a feature to do that. I had a similar request and had to add an attribute to JasperReports library to do it.http://community.jaspersoft.com/questions/977306/how-can-i-fill-table-and-list-end-page-will-empty-rows Link to comment Share on other sites More sharing options...
manshack_one Posted August 30, 2016 Author Share Posted August 30, 2016 KKriplani,If you set a page break like that, what happens if report count is less than 10? Would it repeat the detail band (which is what I'm trying to force the report to do)? Link to comment Share on other sites More sharing options...
manshack_one Posted August 30, 2016 Author Share Posted August 30, 2016 hozawa Link to comment Share on other sites More sharing options...
manshack_one Posted August 30, 2016 Author Share Posted August 30, 2016 Maybe I could force my query results to contain empty rows........Consider that I'm trying to build a sign in sheet for a class. If a class has a capacity of 20 seats (the max I expect) then I need 20 rows for people to sign in on. However, if people have already signed up then I want to pre-populate their names. So how would I force empty rows in the query?tblClassSchedule.classCap is the number of rows I need to generate.select *, (select tblUsers1.userName from tblUsers1 where tblClassSchedule.classInstructor = tblUsers1.ID ) as instructorNamefrom tblClassSchedule, tblClassRoster, tblClassInfo, tblUsers1, tblBranchwhere tblClassRoster.classID = tblClassSchedule.IDand tblClassInfo.ID = tblClassSchedule.classInfoand tblClassRoster.attendeeID = tblUsers1.IDand tblBranch.ID = tblUsers1.userBranchand tblClassSchedule.ID = $P{classScheduleId} 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