Add a blank page for each group with odd pages count
Hi all
i have report which printing a students exams, in some cases the exam for each student is odd pages and i need to print all exams in duplex mode, is there anyway to add blank page if the count of pages for each exam in each student is odd ?
This discussion has been closed.
Comments
Hello!
Automatically adding a blank page after a student (or group) if they have an odd number of pages is done in two steps with `DoublePass = true`:
For `GroupHeaderBand`, set `StartNewPage = true` and `ResetPageNumber = true` (so that the system variable [Page] always starts at 1 for each student).
In the GroupFooter1_AfterPrint handler, add the insertion of a blank page only during the final pass, when the number of pages in the group is odd:
private void GroupFooter1_AfterPrint(object sender, EventArgs e) { if (Engine.FinalPass && ((int)Report.GetVariableValue(‘Page’) % 2 == 1)) Engine.StartNewPage(); }(Do not enable ‘RepeatOnEveryPage’ for the header, or clear the content output flags, so that the inserted page remains a blank side for double-sided printing.)