Report Calcuation

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

Guest

I have a report that is using a query as a record source. I have a group
header named Rep header. In my detail section I have a field named root
cause. There can be multiple root causes for each rep name. I want to have a
field next to the root cause that will total the causes if they have more
than 1 of the same cause. So under Joe Smith I would expect to see a root
casue : Error and the total number 5. Is there a formula I can use with the
unbound text field.

Many thanks!!
 
Bruce said:
I have a report that is using a query as a record source. I have a group
header named Rep header. In my detail section I have a field named root
cause. There can be multiple root causes for each rep name. I want to have a
field next to the root cause that will total the causes if they have more
than 1 of the same cause. So under Joe Smith I would expect to see a root
casue : Error and the total number 5. Is there a formula I can use with the
unbound text field.


You might be able to do that calculation in the report's
record source query. You didn't say what your query is
doing, but for a simple table it would be something like:

SELECT rep, rootcause, Count(*) As RootCount
FROM table
GROUP BY rep, rootcause

If your actual query is too complex for that approach, then
you can add a group level for rootcause to the report. Then
the rootcause group header section can be a text box with
the expression =Count(*) and another text box for the
rootcause. In this rather unusual arrangement, the detail
section would be empty and have a Height of 0.
 
Back
Top