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

How To Switch Order Of Sub-Reports

edited September 2002 in General
I am using RB 6.03 Pro. I have a report with several subreports. Some of
these subreports contain several subreports. All subreports have their
visible property set to false. I then reset the visible property to true
when I need a specific subreport. As each subreport is created a new tab is
created to develop the report in. The problem is that when a report uses
several reports, the print out is in the tab order sequence left to right.

For example:
The first tab named Report1 has 3 subreports listed in it.
The second tab named Report2 has 2 subreports listed in it.
The third tab named Report2b has data.
The fourth tab named Report 2a has data.
The fifth tab named Report3 has data.
All of the reports visible property is false at design-time.

When I set the visible property for Report2, Report2a, and Report2b to true
at run-time, the first page of data will show Report2b and the 2nd page will
have Report2a for the same record of data. How do I switch these so that
Report2a prints before Report2b?

--
Jeff Kreider

Comments

  • edited September 2002
    This depends on the Subreport.PrintBehavior property.

    If you are using section style subreports, then set the subreport's ZOrder
    to determine the print order. Use the BringToFront/SendToBack to control
    this on the subreports.

    If you are using child type subreports, then set the subreport's top
    property to be above the other subreport and set the ShiftRelativeTo
    property of the bottom subreport to shift relative to the subreport above
    it.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited September 2002
    Thanks Jim,
    I am using section style subreports. If I may, I would like to place a
    suggestion of making the ZOrder for subreports a property so that it can be
    changed by hand.

    --
    Jeff Kreider

  • edited September 2002
    Thankyou for the suggestion!


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.