Need Subreports to show for each customer

  • Thread starter Thread starter Carla
  • Start date Start date
C

Carla

I have an access report that has several subreports in
it. For each customer I need to see the subreport (or
something like it) on the report (receipt), even if the
customer doesn't have a purchase. When I originally
posted,(post and reply below) Steve's answer said to
create unbound dummy subreports, place them on top of the
original subreports, and set the visible property on the
dummy reports to false. I've gotten that far. I'm having
problem with the programming.

If Me!MyNormalSubReport.Report.HasData = False Then
Me!MyDummySubReport.Visible = True
Else
Me!MyDummySubReport.Visible = False
End if

In Visual Basic, If I use Me!MySilentItems.Report... or
Me!SilentItems.Report..., It says that it can't find the
field SilentItems. If I use SilentItems, without the Me!
it does not recognize SilentItems as an object. VBA does
recognize the Dummy reports, or at least when I type in
the period after the Dummy report name, the Visual Basic
list box pops up. I really want it to show up on the
report instead of On Print, also.
Any guidance would be appreciated! TIA
Carla

Carla said:
I have a report that I'm working on that has several sub-
reports. I need the subreports to show up and show $0.00
on the report even if the customer didn't buy anything in
that category. TIA
Carla:

The standard way to solve this problem (i.e. that sub
reports with no data
don't display,) is to create an unbound "dummy" sub
report that duplicates
each sub report, but with only the headers you want
displayed on it. The
layer these dummy reports on top of the existing bound
sub reports and set
their visible property to false. Last in the section of
the report that
contains the sub reports add code like this to the
OnPrint event:
 
Thanks, but I got it to work!
-----Original Message-----
I have an access report that has several subreports in
it. For each customer I need to see the subreport (or
something like it) on the report (receipt), even if the
customer doesn't have a purchase. When I originally
posted,(post and reply below) Steve's answer said to
create unbound dummy subreports, place them on top of the
original subreports, and set the visible property on the
dummy reports to false. I've gotten that far. I'm having
problem with the programming.

If Me!MyNormalSubReport.Report.HasData = False Then
Me!MyDummySubReport.Visible = True
Else
Me!MyDummySubReport.Visible = False
End if

In Visual Basic, If I use Me!MySilentItems.Report... or
Me!SilentItems.Report..., It says that it can't find the
field SilentItems. If I use SilentItems, without the Me!
it does not recognize SilentItems as an object. VBA does
recognize the Dummy reports, or at least when I type in
the period after the Dummy report name, the Visual Basic
list box pops up. I really want it to show up on the
report instead of On Print, also.
Any guidance would be appreciated! TIA
Carla


Carla:

The standard way to solve this problem (i.e. that sub
reports with no data
don't display,) is to create an unbound "dummy" sub
report that duplicates
each sub report, but with only the headers you want
displayed on it. The
layer these dummy reports on top of the existing bound
sub reports and set
their visible property to false. Last in the section of
the report that
contains the sub reports add code like this to the
OnPrint event:


--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

.
 
Back
Top