Vertically expanding height of grouped cell based on number of detail cells

Posted by: sstoecker on 21 January 2021, 11:02 am EST

    • Post Options:
    • Link

    Posted 21 January 2021, 11:02 am EST - Updated 30 September 2022, 4:50 pm EST

    This is probably (hopefully) a simple thing. I have a section report designed like so, with three column groups and a detail section that is dynamically generated in code. Here is the design window:

    The rendered report looks like so:

    I would like the first data cell, “Site 1”, to expand the complete height of all the rows in that group (as well as the other two grouped columns):

    If it helps, this is how the cells are generated. The reason I am generating the cells in this manner is that I am dynamically generating columns using the blog post https://www.grapecity.com/blogs/generate-columns-at-runtime-in-activereports:

                for (int i = 1; i < totalNames.Count; i++)
                {
                    textbox = new GrapeCity.ActiveReports.SectionReportModel.TextBox();
                    textbox.Name = "row" + (i).ToString();
                    textbox.DataField = $"Value{i}";
                    textbox.Location = new PointF(1.4f + (i * 0.3f), 0.0f);
                    textbox.Size = new SizeF(0.3f, 0.3f);
                    textbox.Border.Style = GrapeCity.ActiveReports.BorderLineStyle.Solid;
                    ar.Sections[4].Controls.Add(textbox);
                }
    

    So is there a way to adjust the height of those group cells? The cells could stretch across multiple page.

  • Posted 22 January 2021, 12:10 am EST - Updated 30 September 2022, 4:50 pm EST

    Hello,

    There is no direct way to achieve your requirement. Can you add the “CrossSectionBox” in the GroupHeader1 and put the TextBox site inside the CrossSectionBox as shown in the Image.

    Hope it helps.

    Thanks,

    Mohit

  • Posted 22 January 2021, 12:47 pm EST

    Brilliant! The CrossSectionBox worked perfectly. You are my Favorite Person of the Day. Thank you!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels