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

Changing order of SubReports

edited May 2008 in Subreports
I have a report with several subreports. I need to change the order in
which they are printed. How do I do that?



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited May 2008
    Hi,

    You might want to try the ShiftRelativeTo Property of the subreport.
    You set is for each subreport to build up the order in which they are
    printed.

    (subreport component right click option in design mode).

    Chantal


    On Mon, 26 May 2008 09:40:07 +0100, "MartinC"
  • edited May 2008
    Hi Martin,

    Chantal is correct. If you are using Child subreports, you can use the
    ShiftRelativeTo property to determine which subreports print in which order.
    If you are using Section style subreports, you will need to adjust the
    z-order to control the order they are printed. You can control the z-order
    of all components on a report using the Send To Back, Bring To Front options
    in the popup menu when a component is right clicked.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2008
    Nico/Chantal et al:

    The ShiftRelativeTo property DOES re-order the subreports correctly but
    only if I make them Child subreports instead of Section subreports,
    which means they then print all on top of each other: they don't start a
    new page for each subreport.

    So I left the PrintStyle on Section and decided to use the described
    Front" and "Send To Back" method. These certainly didn't work out how I
    thought they would. After a little experimentation, I found they work
    apparently BACKWARDS: "Bring To Front" makes the selected subreport the
    LAST one to be printed, and "Send To Back" makes the selected subreport
    the FIRST one to be printed.

    Is this a bug, or am I misinterpreting the wording somehow?

    Anyway, after this quirk was understood, it was mission acomplished for
    my job, thanks for the help.

    Martin



    --- posted by geoForum on http://delphi.newswhat.com
  • edited June 2008
    Hi Martin,

    This is working as designed. Bring To Front indicates that the component
    will be printed on top (in front) of every other component in the band,
    therefore it will be generated last. Think of it in terms of printing to
    paper, the objects in front will need to be printed last.

    --
    Regards,

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

    Best Regards,

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