Ticket T1279152
Visible to All Users

XtraReport - Display overview of all found nested groups AFTER displaying the details for these nested groups

created 4 days ago

Hello dear DevExpress.
I need to generate table report with two levels of grouping (the top one and the nested one).
This is a simple task using the DevExpress in case the summary info is displayed right after each group using GroupFooterBand (for both top and nested level).

But what if I want to display overview of all nested groups found within one top group AFTER all the details for these nested groups were generated?

The data structure is like:

Code
NAME;DATE;AMOUNT

The wanted report definition is like:
    group by [NAME]
        group by GetMonth([DATE])
            use GroupHeaderBand with DetailBand to show every found nested group and its details
        show overview of all individual groups found by GetMonth([DATE]) within [NAME] + plus calculate their total

So for following sample data:

Code
NAME;DATE;AMOUNT Alice;2025-01-07;84 Alice;2025-01-13;65 Alice;2025-01-29;92 Bobby;2025-01-08;95 Bobby;2025-01-22;75 Alice;2025-02-05;88 Alice;2025-02-17;74 Bobby;2025-02-19;92

The resulting report should be like:

Code
=================================================   Alice ================================================= Details for Alice by months:     January 2025         2025-01-07 ... 84         2025-01-13 ... 65         2025-01-29 ... 92     February 2025         2025-02-05 ... 88         2025-02-17 ... 74 ------------------------------------------------- Summary for Alice by months (after the details for Alice by months):     January 2025  ... 241     February 2025 ... 162     -----------------------     Total         ... 403 =================================================   Bobby ================================================= Details for Bobby by months:     January 2025         2025-01-08 ... 95         2025-01-22 ... 75     February 2025         2025-02-19 ... 92 ------------------------------------------------- Summary for Bobby by months (after the details for Bobby by months):     January 2025  ... 170     February 2025 ...  92     -----------------------     Total         ... 262

What is the proper way to achieve this behavior?
Duplicate the nested grouping by GetMonth([DATE]) within [NAME]? Use sub-report? Generate the overview/summary "manually" by my code?
Thank you.

Answers approved by DevExpress Support

created 3 days ago (modified 3 days ago)

Hello,

To accomplish this task, you can use an XRCrossTab control in the group footer. Use DATE as a row header and AMOUNT as a data field. See also: Define Cross Tab Fields | XRCrossTab.

To filter the cross tab according to the current NAME, use its FilterString property. This approach is described in the following help topic: Filter Data | XRCrossTab.

Please try this solution and let me know if it helps. If it doesn't, share your report layout: Save Report. Once I review your report on my side, I will be in a better position to find a solution.

Regards,
Aleksandr

    Show previous comments (1)
    Aleksandr (DevExpress Support) a day ago

      Hello Miroslav,

      Thank you for the update.

      I kindly ask you to create a separate ticket in the future if your new question isn't directly related to the previous issue. This way, we can process this question most efficiently.

      In the meantime, I created separate tickets on your behalf:

      We placed them in our processing queue and will process them shortly.

      Regards,
      Aleksandr

      MA MA
      Miroslav Ambros a day ago

        Hello Aleksandr.
        OK, I understand. I originally thought there are some already implemented ways how to achieve my goals in XRCrossTab which I didn't discover and which you could advice to me.
        Thank you for creating those new tickets.
        M.

        PS: This ticket could be closed then?

        Aleksandr (DevExpress Support) 20 hours ago

          The described objectives require different APIs and separate solutions. That is why I cloned your previous questions to separate tickets.

          So, I am closing this thread. Please check the newly created tickets; I have already answered them.

          Best regards,
          Aleksandr

          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.