Hide or Show headers depending on subreport content

  • Thread starter Thread starter Al Wagner
  • Start date Start date
A

Al Wagner

I'm writing a report with 3 cascading levels of
information; from a group to orders to parts in the order.
The parts are in a subreport. All works, but I'd like to
hide the order labels (in a row above the data) when there
are no parts under the preceding record. In this way, each
order will stack underneath its headings, like the part
subreport format.
 
Al said:
I'm writing a report with 3 cascading levels of
information; from a group to orders to parts in the order.
The parts are in a subreport. All works, but I'd like to
hide the order labels (in a row above the data) when there
are no parts under the preceding record. In this way, each
order will stack underneath its headings, like the part
subreport format.


Wouldn't get that effect if you moved the labels to the
parts subreport's report header section?
 
The labels for the parts are on the parts subreport. The
problem I'm having is with the order labels repeating for
each order, not the parts. The parts labels work
correctly.

If I have a new order, I want to repeat the label if the
previous order had parts (underneath in the subreport),
otherwise I do not want to repeat the label.
 
The labels for the parts are on the parts subreport. The
problem I'm having is with the order labels repeating for
each order, not the parts. The parts labels work
correctly.

If I have a new order, I want to repeat the label if the
previous order had parts (underneath in the subreport),
otherwise I do not want to repeat the label.


You really shouldn't try to affect the way one record
appears based on another record's data. How about just not
displaying the labels for orders that have no parts?

When there are no parts, the subreport will vanish as
indicated by its HasData property. You can make the headers
visible or not:
Me.label1.Visible = Me.subreport.HasData
which will in turn make the labels elegible for CanShrink.

I'm still guessing at what you're trying to do with this.
Could you post back with a short example of how all this
stuff should look?
 
thanks for your help, but I'm not quite there yet. Here's
how the data should look:

Net Start (top level)
000205000 1/1/04

Order (next level)
000504231
000642385
Part (subreport level)
23232323

Order
000589898

Net
000206000

Order
000569694
000696985
000489654
000358654
Part
23589
56879

Order
000569874
 
Al said:
thanks for your help, but I'm not quite there yet. Here's
how the data should look:

Net Start (top level)
000205000 1/1/04

Order (next level)
000504231
000642385
Part (subreport level)
23232323

Order
000589898

Net
000206000

Order
000569694
000696985
000489654
000358654
Part
23589
56879

Order
000569874


And the labels you want to make disappear show up where? At
what level? I presume that the Net is in a group header
section and that the order is in the detail section, which
also contains the subreport. Right?
 
Right. What I sent is how I want it to look. What I get is
like this:

Net Start (top level)
000205000 1/1/04

Order (next level)
000504231

Order
000642385
Part (subreport level)
23232323

Order
000589898

Net
000206000

Order
000569694

Order
000696985

Order
000489654

Order
000358654
Part
23589
56879

Order
000569874


And the labels you want to make disappear show up where?
At
 
Back
Top