Formatting based on total in Footer

J

JimRAccess

I am working on a report which summarizes orders from different customers
over a certain time frame.

I have a text box which totals the orders for each customer in the footer
for the customer. I would like to show the customer header and the detailed
order information only if the header total exceeds a certain amount.

Example customer A 3 orders for a total $5,500
Customer B 2 orders for a total of $3,500, customer C 1 order for $7500.

I would like the group header, the detail and the footer to show up for
customers A and C, but not B, as the total is below $5,000.

I have the following code in the group footer, but it does not synchorize
for the entire customer. The group header and detail show up based on the
total value of the previous records group footer.

Me.GroupFooter0.Visible = Me.tbAmtContractFtr.Value > lngFltr
Me.Detail.Visible = Me.tbAmtContractFtr.Value > lngFltr
Me.GroupHeader1.Visible = Me.tbAmtContractFtr.Value > lngFltr

Any suggestions on how to do this?
 
M

Marshall Barton

JimRAccess said:
I am working on a report which summarizes orders from different customers
over a certain time frame.

I have a text box which totals the orders for each customer in the footer
for the customer. I would like to show the customer header and the detailed
order information only if the header total exceeds a certain amount.

Example customer A 3 orders for a total $5,500
Customer B 2 orders for a total of $3,500, customer C 1 order for $7500.

I would like the group header, the detail and the footer to show up for
customers A and C, but not B, as the total is below $5,000.

I have the following code in the group footer, but it does not synchorize
for the entire customer. The group header and detail show up based on the
total value of the previous records group footer.

Me.GroupFooter0.Visible = Me.tbAmtContractFtr.Value > lngFltr
Me.Detail.Visible = Me.tbAmtContractFtr.Value > lngFltr
Me.GroupHeader1.Visible = Me.tbAmtContractFtr.Value > lngFltr


You need to do that in the group header section. You should
also duplicate the =Sum text box in the group header.

An Alternative, and usually preferred, approach is to modify
the report's record source query to include the total. With
the specified criteria the report would never see the group
that are filtered out so it would not require any of that
code.
 

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