Issue using Count in Report Footer

  • Thread starter Thread starter Mark Wolven
  • Start date Start date
M

Mark Wolven

Here's the thing - it seems that in several reports that I have
created, when I use count([fieldname]) in a report footer, it prompts
me for a number for [fieldname] and multiplies the true count by the
number I input. The easy workaround, of course, is to enter 1 at the
prompt. But that's not an elegant solution.

The details - I have a report where in the Detail section the Control
Source and the Name are "UniqueLDE" - Running Sum: No

In the Section detail, I have the Control Source:
"=Count([UniqueLDE])" and it is named "CountUniqueLDE" - Running Sum:
No

In the report footer, I have the Control Source:
"=Sum([CountUniqueLDE])" and it is named: "SumUniqueLDEReport" -
Running Sum: No

When I run the report, I am prompted for: CountUniqueLDE and it
appears to multiply the true count, by the number entered.

Any ideas on what I am doing wrong here?
 
I just figured my similar problem out by reading your
question.
Here's how it was done -
In detail section - =sum([UniqueLDE])
In footer section - =[CountUniqueLDE]


Mike D.
 
Generally, you can only count or sum on fields from the query,
not on fields from the report. (The report generally does
Count or Sum by rewriting the SQL for the report data source).

So when you enter "5", it is entered into the SQL for the data
source for the query, which then does SUM(5) over all the records
in the query, giving you 5 * n.

If you want a total count of all the records in the query (all
the records in all the groups == all the records on the query),
you may be able to use =sum(1) or =count(1) in the footer.

If you have calculated fields that you can't move into the query,
you can do your own running sums in the format events of the
report sections (use the formatcount parameter to make sure you
don't double sum values).

(david)
 
Back
Top