suspend footer printing based on grouping.

R

rusty

I have a report with two groups.

Group0 Header
Group1 Header
Detail
Group1 Footer
Group0 Footer

All groups(0 and 1) contain "Totals" for the report.

Each Group Footer is the same, and I do need both. What I
would like to do is suppress the Group1 footer if there is
actually no group(ing) needing to be done, because there
is only one item for the Group(1). If there are two or
more items in Group1 then group0 footer would be the sum
total of the group1 footer.

How can I suspend the group from showing?

Thanks.
 
M

Marshall Barton

rusty said:
I have a report with two groups.

Group0 Header
Group1 Header
Detail
Group1 Footer
Group0 Footer

All groups(0 and 1) contain "Totals" for the report.

Each Group Footer is the same, and I do need both. What I
would like to do is suppress the Group1 footer if there is
actually no group(ing) needing to be done, because there
is only one item for the Group(1). If there are two or
more items in Group1 then group0 footer would be the sum
total of the group1 footer.


Add a text box named txtGrpCount to the group1 footer and
set its expression to =Count(*)

Then add a line of code to the footer's Format event
procedure:
Me.Section(8).Visible = (txtGrpCount > 1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top