Ticket T577747
Visible to All Users

How to merge duplicated values

created 7 years ago

Hi everybody!!

I have one doubt about how to "group lines" in the report usingXRTable element.

I have one report created with an element XRTable, with elemetns XRTableRow and XRTableCell (see imagen1 in the attached .zip), but I need now to "group by " some property, in order to appear all the concepts from each reference together, like in the imagen2 of the .zip.  I´m working with devexpress 13.2.

¿Could anybody help me, please?

Thank you. Regards.

Comments (1)
B B
Brendon Muck [DevExpress MVP] 7 years ago

    Have you reviewed the Grouping and Sorting a Report's Data documentation?

    Answers approved by DevExpress Support

    created 7 years ago

    Hello,
    If the solution provided by Brendon doesn't meet your requirements, I suggest you set the ProcessDuplicates property of the XRTableCell controls in the first and second columns of a table to MergeByValue. I have attached a sample project to illustrate this approach. Please try Brendon's and mine solutions and let me know your results.

      Comments (2)

        Hi Andrey

        Thank you for your response, but I observed that you load with binding in cells and along the report datasource.

        It doesn´t work for me because I have anothers xrtables in report and I load them along programmation, so, exists any form to configure this options or make the same effects for this other form?

        I attach th report I manage.

        Tha k you

        Regards

        DevExpress Support Team 7 years ago

          Hello,
          The ProcessDuplicatesMode mode properly works only for a repeated Detail band. Since you add rows to a table at runtime you should manually calculate how many times the specific field's value occurs in the data source and set the RowSpan value of the cell that should display data from this field. This solution requires a lot of code, so I recommend you use the built-in data binding approach (see the Binding Report Controls to Data article for details).

          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.