Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

re-ordering groups

edited September 2003 in General
I want to swap two group's group/footer break from inner to outer and
vice-versa.
In the ReportBuilder Designer Groups Dialog, I can simply re-order the
groups by drag & drop, which accomplishes exactly what I want.
How would this be done in code during program execution?

TIA,

monte etherton
automated concepts

Comments

  • edited September 2003
    Sorry I forgot the VInfo: D7, RB7.03Pro

  • edited September 2003
    Hi Monte,

    Sorry, I just did a full refresh of the newsgroup and finally saw your
    original message. Thanks for bringing that to my attention. You're going
    to want to check out the Report.Groups[] property. Reordering the group
    objects in this TList will give you the effect you want. See the
    TList.Exchange() and TList.Move() methods in the Delphi help for more
    information on how to move objects around in a list.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2003
    Can you give me an example please?

    I tried this:

    TList(MyReport.Groups).Exchange(0,1)

    but it wants an index for the groups property.

    If "Groups" is a TList, shouldn't that work?

    Thanks,

    Monte

  • edited September 2003
    Hi Monte,

    Sorry, I forgot that there is a built-in function to perform this
    function...

    Report.MoveGroup(aCurrentPos, aNewPos: Integer);

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.