This is a migrated thread and some comments may be shown as answers.

move a group upwards

2 Answers 303 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zeeshan
Top achievements
Rank 1
Zeeshan asked on 15 Jul 2007, 11:26 PM
I created two groups like
group1 and then a group2 inside now when i created a group 3 it gets added inside of group2 which is fine. but in this case i want to move that group upwards at the very top. The designer does let me drag the group upwards before the group1. How do i go about making it the first group

Thanks
Zeeshan HIrani

2 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 16 Jul 2007, 04:48 PM
Hi Zeeshan,

At present, new groups are always added to the innermost group level, and you cannot reorder them. You cannot insert a group between two other groups either.

Both of these are missing features and we hope to fix it for the next version. Sorry for the inconvenience.


Kind regards,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
miacoviello
Top achievements
Rank 1
answered on 02 Aug 2007, 12:31 AM
Hi Zeeshan, you can move the groups very easily by modifying the designer code.  I had the same issue and successfully moved the groups without having to cut/paste or rebuild the grouping.

At the bottom of the Initialization in the designer code you will see two AddRange calls, one on Groups and one on Items.

Just rearrange the order the groups are added to the me.groups.addrange call.

In the Me.Items.Addrange call make sure that your group header and group footers are moved as well... basically following your suggestion of "moving up".  Note that the Items are added in the way they appear in the report (group header, details, group footer etc..).

That's the easier way to do it until the functionality is added to the designer UI.

I show in the example below the before and after code displaying the rearranging that was performed to the code to accomplish this.  When returning to the designer UI you will see the groups are now rearranged.

Michael Iacoviello

----------------------------------------------------------------------------------

Before Update Grouping:

Me.Groups.AddRange(New Telerik.Reporting.Group() {Me.groupAppExitCode, Me.Group1})

Me.Items.AddRange(New Telerik.Reporting.ReportItemBase() {Me.GroupHeaderSection1, Me.GroupFooterSection1, Me.PageHeaderSection1, Me.DetailSection1, Me.PageFooterSection1, Me.ReportFooterSection1, Me.GroupHeaderSection2, Me.GroupFooterSection2})



After Update Grouping:

Me.Groups.AddRange
(New Telerik.Reporting.Group() {Me.Group1, Me.groupAppExitCode})

Me.Items.AddRange(New Telerik.Reporting.ReportItemBase() {Me.GroupHeaderSection2, Me.GroupFooterSection2, Me.GroupHeaderSection1, Me.GroupFooterSection1, Me.PageHeaderSection1, Me.DetailSection1, Me.PageFooterSection1, Me.ReportFooterSection1})

Tags
General Discussions
Asked by
Zeeshan
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
miacoviello
Top achievements
Rank 1
Share this question
or