Hello,
in my simple detail report I need a subtotal summary on every page on the page bottom.
In addition I need the same summary value from the last pages bottom on the actual page before the first row is printed (below the page header).
Can you give me a tip how to do this ?
Thank you
Hermann
subtotal on page bottom and on next page on top
Answers
Hello Hermann,
Thank you for contacting us. As for calculating a summary on every page, you can use summary by page, e. g.:
C#xrLabel1.DataBindings.AddRange(new XRBinding[] {XRBinding("Text", null, "Products.CategoryID")});
XRSummary xrSummary1 = new XRSummary();
xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Page;
xrLabel1.Summary = xrSummary1;
A summary can be created at design time too. For instance, please refer to the Calculating Summaries help section.
As for the second question, you should use a double-pass technique to update a report with the value calculated during the first pass. For example, see the summary field of the report group with sum of all items on previous pages thread.
Thanks,
Alessandro.
Thank you Alessandro,
this solves my problem partially. I have read and understood. But in my case I have to handle a custom summary per page (like in How to: Calculate a Custom Summary).
Can you show me, how this works on a double-pass technique with two call of "CreateDocument()" ?
Hermann
Hermann,
Certainly! Attached is a small sample, demonstrating the basic principals of this technique. Hope this information helps you.
Thanks,
Alessandro.