Report: Get Count Total

  • Thread starter Thread starter Lisa
  • Start date Start date
L

Lisa

In a report group footer, I did a count on a control
source equation, eg.=Count([Field])-1. This worked
great. My problem is with the grand total. How can I
come up with a grand total of these results in the Report
Footer? I can attach the db if needed.

Thanks much. Lisa Murphy
 
Lisa,
To count records in a group, place an unbound control in the group header or
group footer:
=Count(*)

To count all the record, place an unbound control in the Report Footer:
=Count(*)

As you can see, the count returned is dependent upon where you place the
control.
This is not available for use in the Page Footer.
 
Yes, I understand where to place the unbound control to
get a grand total count. My problem lies with the
formula. In the group footer, a count is done on the
records after 1 has been subtracted from each record.
Then I want to simply do a grand total on these counts.
But the grand total gives me a count of all the records,
and won't show the subtraction of 1 for each record I did
in the group footer. Ugh. This is driving me crazy, as
it seems so simple. Are you sure you won't look at the
db if I attach and send? Thanks. Lisa Murphy
-----Original Message-----
Lisa,
To count records in a group, place an unbound control in the group header or
group footer:
=Count(*)

To count all the record, place an unbound control in the Report Footer:
=Count(*)

As you can see, the count returned is dependent upon where you place the
control.
This is not available for use in the Page Footer.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Lisa said:
In a report group footer, I did a count on a control
source equation, eg.=Count([Field])-1. This worked
great. My problem is with the grand total. How can I
come up with a grand total of these results in the Report
Footer? I can attach the db if needed.

Thanks much. Lisa Murphy


.
 
Lisa,

Let's say you have a database with 14 records.
In your report you have a group with 3 records.
You wish the count of records in this group to be 3 - 1 = 2.
The next group has 10 records.
You wish the count of this group to be 10 - 1 = 9.
You then have a Group with just 1 record.
You wish the count of this group to be 1 - 1 = 0
In the Report Footer you wish to show the total of the
reported Group count as 11, not 14.

Do I have that right?

If so, here are 2 ways to do this.

1) Add a control to the Report Group footer:
=Count(*) - 1
Running Sum No.

Add a second control to the Group footer.
= Count(*) - 1
Running Sum Over All.
Name this Control AddUp.
You can make it Not Visible.

In the Report Footer, add a control.
=[AddUp]

2) Another way is to simply count how many groups there
are and subtract that from the total number of records.

Add a control to the Group Footer.
=1
Running Sum Over All
Name this control [GroupCounter]
You can make this not visible if you want.

Add a control to the Report Footer.
=Count(*) - [GroupCounter]

Either one of these methods will give you your count.

Hope I've got it for you now.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Lisa said:
Yes, I understand where to place the unbound control to
get a grand total count. My problem lies with the
formula. In the group footer, a count is done on the
records after 1 has been subtracted from each record.
Then I want to simply do a grand total on these counts.
But the grand total gives me a count of all the records,
and won't show the subtraction of 1 for each record I did
in the group footer. Ugh. This is driving me crazy, as
it seems so simple. Are you sure you won't look at the
db if I attach and send? Thanks. Lisa Murphy
-----Original Message-----
Lisa,
To count records in a group, place an unbound control in the group header or
group footer:
=Count(*)

To count all the record, place an unbound control in the Report Footer:
=Count(*)

As you can see, the count returned is dependent upon where you place the
control.
This is not available for use in the Page Footer.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Lisa said:
In a report group footer, I did a count on a control
source equation, eg.=Count([Field])-1. This worked
great. My problem is with the grand total. How can I
come up with a grand total of these results in the Report
Footer? I can attach the db if needed.

Thanks much. Lisa Murphy


.
 
Thank you so much, Fred. Your grasp of the problem was
right on the money. Your solution(s)worked perfectly,
and I will tuck this knowledge away for future
reference. Thanks again. Lisa
-----Original Message-----
Lisa,

Let's say you have a database with 14 records.
In your report you have a group with 3 records.
You wish the count of records in this group to be 3 - 1 = 2.
The next group has 10 records.
You wish the count of this group to be 10 - 1 = 9.
You then have a Group with just 1 record.
You wish the count of this group to be 1 - 1 = 0
In the Report Footer you wish to show the total of the
reported Group count as 11, not 14.

Do I have that right?

If so, here are 2 ways to do this.

1) Add a control to the Report Group footer:
=Count(*) - 1
Running Sum No.

Add a second control to the Group footer.
= Count(*) - 1
Running Sum Over All.
Name this Control AddUp.
You can make it Not Visible.

In the Report Footer, add a control.
=[AddUp]

2) Another way is to simply count how many groups there
are and subtract that from the total number of records.

Add a control to the Group Footer.
=1
Running Sum Over All
Name this control [GroupCounter]
You can make this not visible if you want.

Add a control to the Report Footer.
=Count(*) - [GroupCounter]

Either one of these methods will give you your count.

Hope I've got it for you now.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Lisa said:
Yes, I understand where to place the unbound control to
get a grand total count. My problem lies with the
formula. In the group footer, a count is done on the
records after 1 has been subtracted from each record.
Then I want to simply do a grand total on these counts.
But the grand total gives me a count of all the records,
and won't show the subtraction of 1 for each record I did
in the group footer. Ugh. This is driving me crazy, as
it seems so simple. Are you sure you won't look at the
db if I attach and send? Thanks. Lisa Murphy
-----Original Message-----
Lisa,
To count records in a group, place an unbound control
in
the group header or
group footer:
=Count(*)

To count all the record, place an unbound control in
the
Report Footer:
=Count(*)

As you can see, the count returned is dependent upon where you place the
control.
This is not available for use in the Page Footer.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


In a report group footer, I did a count on a control
source equation, eg.=Count([Field])-1. This worked
great. My problem is with the grand total. How can I
come up with a grand total of these results in the Report
Footer? I can attach the db if needed.

Thanks much. Lisa Murphy


.


.
 
Back
Top