total number in footer on report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an access report and want to count the number of entries (non zero)
in two columns.

ex: Column 1 (person) Column 2 (event 1) and column 3 (event 2)
Sometimes for a person they may have an entry in either or both column 1 and
column 2. At the end of each page and/or the report I need to know how many
times there is an extry in each column.

I used =count(xx) in the footer of the report and I get the number of
persons listed in column 1 whether or not there is anything in Column 2 or 3.
I want to count the non zero entries in column 2 and 3 by page and/or report.

Hope someone can help.
 
Tommy said:
I have an access report and want to count the number of entries (non zero)
in two columns.

ex: Column 1 (person) Column 2 (event 1) and column 3 (event 2)
Sometimes for a person they may have an entry in either or both column 1 and
column 2. At the end of each page and/or the report I need to know how many
times there is an extry in each column.

I used =count(xx) in the footer of the report and I get the number of
persons listed in column 1 whether or not there is anything in Column 2 or 3.
I want to count the non zero entries in column 2 and 3 by page and/or report.


Curious about what you might have used for xx there.

That may not matter, I definitely need to know what the
value is for the fields that don't "have an entry" in a
column. You say non-zero, does that mean they are zero? Or
are they Null? Or something else?

If the value is Null:
=Count([event 1])
if the value is zero:
=Count(IIf([event 1] = 0, Null, [event 1]))

You can get the count in a group footer and the report
footer pretty easily (depending on the answers to above
questions). How ever, getting the count per page is not
simple.
 
Marshall

The value for xx is the field name "pledge 1" or "pledge 2", etc. The value
would be zero if it is empty. On the form we default to zero if no entry is
made.

Does this help? I'll try your first suggestion.

Marshall Barton said:
Tommy said:
I have an access report and want to count the number of entries (non zero)
in two columns.

ex: Column 1 (person) Column 2 (event 1) and column 3 (event 2)
Sometimes for a person they may have an entry in either or both column 1 and
column 2. At the end of each page and/or the report I need to know how many
times there is an extry in each column.

I used =count(xx) in the footer of the report and I get the number of
persons listed in column 1 whether or not there is anything in Column 2 or 3.
I want to count the non zero entries in column 2 and 3 by page and/or report.


Curious about what you might have used for xx there.

That may not matter, I definitely need to know what the
value is for the fields that don't "have an entry" in a
column. You say non-zero, does that mean they are zero? Or
are they Null? Or something else?

If the value is Null:
=Count([event 1])
if the value is zero:
=Count(IIf([event 1] = 0, Null, [event 1]))

You can get the count in a group footer and the report
footer pretty easily (depending on the answers to above
questions). How ever, getting the count per page is not
simple.
 
Marshall

I tried your suggestion and got it to work (kind of).

I got totals (at the report end) of each event. Event 1 = 398, event 2 =
148, etc. What I need now is what is the total number of events for all 9
events. Can I somehow link the iff statements or total them somehow in the
report footer so I end up with one number instead of nine?

Thanks again for your quick and knowledgable response.

Tommy Boy

Marshall Barton said:
Tommy said:
I have an access report and want to count the number of entries (non zero)
in two columns.

ex: Column 1 (person) Column 2 (event 1) and column 3 (event 2)
Sometimes for a person they may have an entry in either or both column 1 and
column 2. At the end of each page and/or the report I need to know how many
times there is an extry in each column.

I used =count(xx) in the footer of the report and I get the number of
persons listed in column 1 whether or not there is anything in Column 2 or 3.
I want to count the non zero entries in column 2 and 3 by page and/or report.


Curious about what you might have used for xx there.

That may not matter, I definitely need to know what the
value is for the fields that don't "have an entry" in a
column. You say non-zero, does that mean they are zero? Or
are they Null? Or something else?

If the value is Null:
=Count([event 1])
if the value is zero:
=Count(IIf([event 1] = 0, Null, [event 1]))

You can get the count in a group footer and the report
footer pretty easily (depending on the answers to above
questions). How ever, getting the count per page is not
simple.
 
You can use the same expression in the group footer to count
the entries in each group and again in the report footer to
count the entire report.

=Count(IIf([event 1] = 0, Null, [event 1]))
--
Marsh
MVP [MS Access]


Tommy said:
I tried your suggestion and got it to work (kind of).

I got totals (at the report end) of each event. Event 1 = 398, event 2 =
148, etc. What I need now is what is the total number of events for all 9
events. Can I somehow link the iff statements or total them somehow in the
report footer so I end up with one number instead of nine?

Marshall Barton said:
Curious about what you might have used for xx there.

That may not matter, I definitely need to know what the
value is for the fields that don't "have an entry" in a
column. You say non-zero, does that mean they are zero? Or
are they Null? Or something else?

If the value is Null:
=Count([event 1])
if the value is zero:
=Count(IIf([event 1] = 0, Null, [event 1]))

You can get the count in a group footer and the report
footer pretty easily (depending on the answers to above
questions). How ever, getting the count per page is not
simple.
 
Thank you

I appreciate your help

Tommy Boy

Marshall Barton said:
You can use the same expression in the group footer to count
the entries in each group and again in the report footer to
count the entire report.

=Count(IIf([event 1] = 0, Null, [event 1]))
--
Marsh
MVP [MS Access]


Tommy said:
I tried your suggestion and got it to work (kind of).

I got totals (at the report end) of each event. Event 1 = 398, event 2 =
148, etc. What I need now is what is the total number of events for all 9
events. Can I somehow link the iff statements or total them somehow in the
report footer so I end up with one number instead of nine?

Tommy Boy wrote:
I have an access report and want to count the number of entries (non zero)
in two columns.

ex: Column 1 (person) Column 2 (event 1) and column 3 (event 2)
Sometimes for a person they may have an entry in either or both column 1 and
column 2. At the end of each page and/or the report I need to know how many
times there is an extry in each column.

I used =count(xx) in the footer of the report and I get the number of
persons listed in column 1 whether or not there is anything in Column 2 or 3.
I want to count the non zero entries in column 2 and 3 by page and/or report.
Marshall Barton said:
Curious about what you might have used for xx there.

That may not matter, I definitely need to know what the
value is for the fields that don't "have an entry" in a
column. You say non-zero, does that mean they are zero? Or
are they Null? Or something else?

If the value is Null:
=Count([event 1])
if the value is zero:
=Count(IIf([event 1] = 0, Null, [event 1]))

You can get the count in a group footer and the report
footer pretty easily (depending on the answers to above
questions). How ever, getting the count per page is not
simple.
 
Back
Top