Reorder Groups

Posted by: cjames on 4 August 2017, 2:35 pm EST

  • Posted 4 August 2017, 2:35 pm EST

    Reorder groups

    I am interested in programmatically reordering groups. How can I change the order of groups like what the Reorder Groups dialog in the designer can do?

    I read a posting in AR News Group Archive which stated that AR design team has not included this functionality in the end-user designer "adding a reorder groups property".

    Has this functionality been added? If not, is there some other way I can reorder groups?

  • Replied 4 August 2017, 2:35 pm EST

    You should be able to re-insert the groupheader and groupfooter pair using the reportobject.Sections.Add method. You would need to create a variable for temporarily holding the section, remove it and then insert it at the correct index.
  • Replied 4 August 2017, 2:35 pm EST

    Thanks for the suggestion. However, I have yet to add/ remove sections at run time. Might you have some examples?

    In particular I am unsure about how to store and remove a section.
  • Replied 4 August 2017, 2:35 pm EST

    I haven't forgotten about the sample. I don't have an existing sample to send you, so it may take a few days. The sample will create a temporary variable to hold the section, assign the section to it, RemoveAt() the section from the report and Add() it at the new index.
  • Replied 4 August 2017, 2:35 pm EST

    I haven't completely finished the code, but you can use my sample as a starting point. You'll need to add code to transfer the controls to the newly created section. ActiveReports for .NET support Inserting a section and its much faster than ActiveReports 2.0. I've attached my sample.

  • Replied 4 August 2017, 2:35 pm EST

    Thanks for the info. Unfortunately I am not using AR for .net. As an interim solution I have added an identical grouping to the reports designer to enable re-ordering capabilities.

    Example groupings:
    Groupings gh1 and gh3 are identical.
    This enables the reports to have re-ordering functionality. Grouping by either gh3/gh2 or gh2/gh1.
Need extra support?

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

Learn More

Forum Channels