Posted 4 August 2017, 2:53 pm EST
The report in question is a Gradebook report. The rows represent students and the columns represent assignment scores. The GroupFooter prints the class average for each assignment. Of course the number of students can vary from class to class. Likewise, the number of assignments varies too. The maximum number of students that fit on a page is 25. The maximum number of score columns is 20. If the class has more the 25 kids, the students spill onto a second page and the footer prints there. If the class has more then 20 assignments, the report processes 25 students at a time and prints all of the assignments for the 25 and the footer then moves to the next 25 if there are any.
Now to the problem(s). As I said the cutoff for a page is 25 students. If the class has less then 25 kids, no problem. Everything works fine. If the class has 25 exactly, the class prints on a single page with the footer no problem. Then a blank page prints. If the class has 26 students, page one prints students 1-25 and the report stops. No 26th student and no footer are printed. 27 students print on two pages as expected and there is a footer but the value in the footer is simply a repeat of the 27th students scores and not the class average. Finally, a report with 28 students works perfectly.
I have played with the GrpKeepTogether, KeepTogether, Repeat and NewPage settings on the GroupHeader and GroupFooter. I can not find the right combination. Currently they are set at
- GroupHeader.Repeat = 1-Every Page
- GroupHeader.GrpKeepTogether = 0-None
<LI>GroupHeader.KeepTogether = False
<LI>GroupHeader.Repeat = 1-Every Page
<LI>GroupFooter.KeepTogether = True
<LI>GroupFooter.NewPage = 2-After
I should mention that the scores are stores in hidden containers on the GroupFooter and calculated in the OnFormat event. There is other code but it is has to do with the content of the report. Not the control of the report.
I also tweaked the dimensions of the rows but this only changed the cutoff and the problem remained.
Could this be a bug or is it simply that my settings are wrong.