How to sum up the summary totals (1 Viewer)

moi

Member
Local time
Today, 21:01
Joined
Jan 10, 2024
Messages
202
Dear all,

I created a report through the wizard and with summary of groups, now my problem is when I summed ( =Sum[tcp] )up the summary totals it gives me a wrong figures.. Pls i need help, what is the correct function, sum is not giving the correct figure..
 

tvanstiphout

Active member
Local time
Today, 06:01
Joined
Jan 22, 2016
Messages
222
Show us, because we all use Sum(FieldName) and it works for us.
 

moi

Member
Local time
Today, 21:01
Joined
Jan 10, 2024
Messages
202
Show us, because we all use Sum(FieldName) and it works for us.
Yes I always use the Sum[fieldname], this is what puzzled me.. see attached
 

Attachments

  • Screenshot (44).png
    Screenshot (44).png
    44.1 KB · Views: 27

tvanstiphout

Active member
Local time
Today, 06:01
Joined
Jan 22, 2016
Messages
222
That formula looks good to me.
Now we have to turn to the data. Show us the data, and the resulting sum. Why is that wrong to you?

I'm assuming a sales report is run for a date range. What if you restrict to a single date? Still wrong?
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:01
Joined
Sep 21, 2011
Messages
14,306
Where is txtTotalPayment coming from?
 

moi

Member
Local time
Today, 21:01
Joined
Jan 10, 2024
Messages
202
That formula looks good to me.
Now we have to turn to the data. Show us the data, and the resulting sum. Why is that wrong to you?

I'm assuming a sales report is run for a date range. What if you restrict to a single date? Still wrong?
I will try that one.. this is were the report coming from..
 

Attachments

  • Screenshot (46).png
    Screenshot (46).png
    91.5 KB · Views: 21

Gasman

Enthusiastic Amateur
Local time
Today, 14:01
Joined
Sep 21, 2011
Messages
14,306
And where on the report is that control?
 

moi

Member
Local time
Today, 21:01
Joined
Jan 10, 2024
Messages
202
That formula looks good to me.
Now we have to turn to the data. Show us the data, and the resulting sum. Why is that wrong to you?

I'm assuming a sales report is run for a date range. What if you restrict to a single date? Still wrong?
Only the page total i got wrong, i can not figure out where is the problem..
 

moi

Member
Local time
Today, 21:01
Joined
Jan 10, 2024
Messages
202
That formula looks good to me.
Now we have to turn to the data. Show us the data, and the resulting sum. Why is that wrong to you?

I'm assuming a sales report is run for a date range. What if you restrict to a single date? Still wrong?
I compared the total to excel column total.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:01
Joined
Feb 19, 2002
Messages
43,275
Functions in a report ALWAYS refer to column names from the recordsource, they do not refer to control names. So, if you have a control that adds three fields and you want to sum that value, you repeat the calculation.

=Sum(Nz(TotalPrice,0) + Nz(Tax,0) + Nz(Shipping,0))
NOT
=Sum(txtNet)

PS, if you have any potentially null values, you need to use Nz() to get rid of them when doing calculations.
 

Users who are viewing this thread

Top Bottom