Ticket Q272286
Visible to All Users

subtotal on page bottom and on next page on top

created 15 years ago

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

Answers

created 15 years ago

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.

    Comments (2)

      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

      Alessandro (DevExpress Support) 15 years ago

        Hermann,
        Certainly! Attached is a small sample, demonstrating the basic principals of this technique. Hope this information helps you.
        Thanks,
        Alessandro.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.