Home End User

Change subreport order by RAP

edited February 2010 in End User
Hello,
I am using RB 11.05 under Delphi 7.
I need to change the subreports printing order from the
OnGetAutosearchValues method.
Say that the report has 3 subreports:
sub1
sub2
sub3
the user can choose a parameter, in the launching form, that changes the
order in, say:
sub2
sub3
sub1

One solution could be duplicate the sub1 and use the visible property to
hide one copy and show the other. But this obviously means duplicate the
subreport...
I am looking for a smarter solution if any ...
I've tried setting the zorder property but with no success.
Thanks
Bye
Nicola

Comments

  • edited February 2010
    Hi Nicola,

    If you are using child style subreports, you will need to change the
    ShiftRelativeTo properties of the subreports. For instance...

    Subreport1.ShiftRelativeTo := Subreport3;
    Subreport3.ShiftRelativeTo := Subreport2;
    Subreport2.ShiftRelativeTo := nil;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2010

    Yes they are child style.
    It works thanks
    Bye
    Nicola

This discussion has been closed.