Total number of Detail Band in an other Band



How can I get the total number of lines in the detail band. I would like to have a detail 2 band or column footer band appear only when the detail 1 band is finished.

I always get the current number of lines, no matter if I am in Page Footer or Column Footer. 

I tried a variable, but that did not work. 

Do you have any advice for this?

Thank you

Best regards


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

3 Answers:

Not sure what you exactly want to reach,... but the built-in variable $V{REPORT_COUNT} will always return the current number of "consumed" records of the current report.

So if you place this variable into page footer band and set the evaluation time to "NOW" it will return the current number of records (e.g. 10 fits to one page so will get "10" at 1. page... "20" at 2. page and so on. (although there is also a built in variable $V{PAGE_COUNT} when I remember right that does similar counts)

If you set the evaluation time to "REPORT" you will have the TOTAL numbers of records even in the first page footer because this textfield will be overriden when the report is finish and the current (=total) numbers of records will be set to these textfields in each page footer.

Otherwise you could also create a dummy group (without any expression) and just use the group-footer band... this will be printed just after the last detail (and there you could place any final content with the $V{REPORT_COUNT} variable or whatever you want. The summary could also be used to do some final stuff... there is also a flag to print pageheader and pagefooter with the summary or to appear on a new page as well.

hth + regards


C-Box's picture
Joined: Jul 19 2006 - 5:58pm
Last seen: 5 months 2 weeks ago

Thank you very much C-Box!!  I made a group band as you suggested. Works perfectly!

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

Thanks C-BOX, create a group footer with no expression works for me and now my grand totals appears perfectly!

vitormacieleler's picture
Joined: Dec 23 2021 - 6:17am
Last seen: 2 months 6 days ago