Hi Cary,
To accomplish this task you can either add a GroupFooter band and set the GroupFooter.PageBreak to AfterBand.
or put a XRPageBreak control, handle the Detail.BeforePrint and adjust the visibility of the XRPageBreak as you need.
To get processing row you need to use the XtraReport.GetCurrentRow() method.
Please try this solution, and let us know the results.
Thanks,
Andrew
I am not sure of what you are suggesting. As I have the report built I have a group header band with several fields. What field would I use for the group footer band and how would I make sure that it forces a page break when the label in the group header changes? I have selected the option of group union to whole page, keep together and print on every page for the current group header.
IF I elect to use the XRPageBreak control, can the getcurrentrow be compared to the next row in order to activate (make visible) the pagebreak? If I understand what you are suggesting, I would need to compare the datagrid values for the current row and compare with the datagrid value of the next row and if different I would make the XRPageBreak visible. Is that correct, and if so, does the XtraReport allow the next row to be printed to be processed?
Hello Cary,
Assuming that you set the GroupFooter.PageBreak option to AfterBand, the page break will be made automatically when the group field changes its value, and a new group begins.
As for comparing values from the current, next and previous rows, yes, it's possible. Please use the XtraReport.GetNextColumnValue(), XtraReport.GetPreviousColumnValue() and XtraReport.GetCurrentColumnValue() to obtain these values.
Attached is a sample project, demonstrating both approaches in action. Please let me know whether this helps you.
Thanks,
Alessandro.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+