Ticket T1279764
Visible to All Users

How to set ColumnSpan and RowSpan for XRCrossTabCell in code

created 3 days ago (modified 2 days ago)

[DevExpress Support Team: CLONED FROM T1279152: XtraReport - Display overview of all found nested groups AFTER displaying the details for these nested groups]

Just note: I create the report definitions by C# code on my own but in case of troubles I can export it to WYSIWYG editor, find the solution and then to project found solution to my code.

My current result is this summary table:
Clipboard-File-1.png

Issue 5) How can I set properties ColumnSpan and RowSpan of XRCrossTabCell object using the C# code? These properties are not accessible from the IDE but they can be set the in WYSIWYG editor.
It seems the properties are defined as:

Code
[DefaultValue(1)] [XtraSerializableProperty] [Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] public int ColumnSpan { get; set; } = 1;

The desired result is something like this:
Clipboard-File-2.png

Thank you very much. I know I have a lot of questions. :-)
M.

Answers approved by DevExpress Support

created 2 days ago

Hello Miroslav,

XRCrossTabCell does not support the ColumnSpan and RowSpan properties. These properties only function for table cells. Therefore, they are not available in the Report Designer.

From what I gather, you wish to redesign the cross tab's header. If this is the case, I recommend you hide the header and add a separate XRTable above the cross tab. Use its cells and their ColumnSpan and RowSpan properties to design the required layout as needed.

Please try this solution and let me know if it meets your requirements. If not, please describe the desired result in greater detail.

Regards,
Aleksandr

    Comments (2)
    MA MA
    Miroslav Ambros 2 days ago

      Thanks, your proposed solution could work.

      It seems I was mistaken by myself. I saw the table layout for XRCrossTab with the cells spanning across multiple rows or multiple cells. But this wasn't achieved by explicit definition of ColumnSpan or RowSpan - it is defined implicitly by setting the Column Fields and Row Fields

      Clipboard-File-2.png

      OK, so this is clear.

      Aleksandr (DevExpress Support) 19 hours ago

        Your are welcome, Miroslav.

        I'm happy to hear that my solution meets your requirements.

        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.