fixed rows in detail band

Hello, 

i would like to have a number of 33 rows  in the detail band no matter if 10 or 5 rows are filled. I´ve tried a lot but i did not find a solution.

Can you please help me?

Thank you

ye_l's picture
163
Joined: Mar 12 2019 - 1:11am
Last seen: 8 months 3 weeks ago

2 Answers:

perhaps just an idea:

Just render your filled results from main query (e.g.) 10 records in the main report and then place a SubReport into a following band (e.g. summary or a group footer) with a DataSourceExpression like this:

new JREmptyDataSource(33 - $V{REPORT_COUNT}) 

where $V{REPORT_COUNT} is the current record number consumed by the main report.

in your SubReport layout you could then easily generate empty lines/borders whatever to simulate a kind of "prefilled formular" with just partly filled rows.

Of course you should consider, what happens, if you have more than 33 records in your main query returned.... so perhaps you should then make a Rest division by 33 or whatever else.

hth + regards

C-Box

C-Box's picture
19683
Joined: Jul 19 2006 - 5:58pm
Last seen: 3 months 5 days ago

Thank you very much C-Box!!! It works great!!!

Best regards!!

Yes, now I have a problem with more than 33 lines. I have the subreport with the empty lines in column footer. If I have more then 33 lines, i want that the subreport appear when the $V{REPORT_COUNT}%33>0. But in every row of the Detailband, the subreport appears and I have many empty Rows. 

How can I make sure that at the end of the table I have the total number of lines and then the column band comes.

I've already tried Pagecount. But that did not work

Thank you!

 

ye_l's picture
163
Joined: Mar 12 2019 - 1:11am
Last seen: 8 months 3 weeks ago
Feedback
randomness