Help with Sum and Count
I have a report that is using a GROUP BY clause and appears to be working
fine except for the Sum() and Count() TppDBCalc's.
At design time when I am previewing it I have the following labels that are
located on the report's footer section:
Total Orders : Count(Order_ID)
Orders Total : Sum(Total_Due)
Minimum Total : Minimum(Total_Due)
Maximum Total : Maximum(Total_Due)
Average Order Total : Average(Total_Due)
The Minimum, Maximum and Average TppCalc's are working fine, but the Count()
TppCalc is showing the total orders in the table and not the total orders on
the report, and the Sum() TppCalc is showing again, the total of all the
orders in the table and not just the orders on the report.
Can someone explain what might be going wrong here?
Thanks,
--
Reid Roman
Future Generation Software
http://www.fgsoft.com
fine except for the Sum() and Count() TppDBCalc's.
At design time when I am previewing it I have the following labels that are
located on the report's footer section:
Total Orders : Count(Order_ID)
Orders Total : Sum(Total_Due)
Minimum Total : Minimum(Total_Due)
Maximum Total : Maximum(Total_Due)
Average Order Total : Average(Total_Due)
The Minimum, Maximum and Average TppCalc's are working fine, but the Count()
TppCalc is showing the total orders in the table and not the total orders on
the report, and the Sum() TppCalc is showing again, the total of all the
orders in the table and not just the orders on the report.
Can someone explain what might be going wrong here?
Thanks,
--
Reid Roman
Future Generation Software
http://www.fgsoft.com
This discussion has been closed.
Comments
ReportBuilder only uses the data you give it to make calculations on a given
dataset. Make sure you are connecting the calc components to the same data
set as the report.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Try placing a variable in place of the DBCalc and calculating the sum using
another variable within the detail band. Then you can reset the variable on
Group end to reset the total sum displayed.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com