Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Calculation

Status
Not open for further replies.

EMax1

MIS
Apr 8, 2004
95
US
I created a report that totalizes different values from a query.
To simplify, this report produce something like the following:

Location 1
Sale 1: 5000
Sale 2:10000
% of Total Sale: ???

Location 2
Sale 3: 6000
Sale 5:20000
% of Total Sale: ???
etc…

Total Sales: 41000

To calculate the ‘% of Total Sale’ and insert it in each ‘Location’ as indicated, I will need to know the total Sales value that is calculated at the end of the report.
How can I do this, if it is possible?
Thanks in advance.
Louis
 
You need to calculate the total independently.
Use a DSum() function in the Form_Open event for example; store the result in a variable and use it in the group footer calculations.
 
So much easier when you know!!
Thanks.
Louis
 
Well.

The value calculated as follows:
AAA =DSum("[EXTSELL]","COMM","[LOC]=2")

work fine, but how can I replace the '2' with the current Location that is also the value of the current 'Location Header'.

I tried : 'DSum("[EXTSELL]","COMM","[LOC]=[LOC]")', but this is not correct.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top