Specific totals into a report

ConfusedA

Registered User.
Local time
Today, 17:19
Joined
Jun 15, 2009
Messages
101
Hi there everyone. I am trying to create a report that displays a set of numbers (based on certain job types) and their corresponding price.

I have this working up to a certain point, but I have a slight snag. 2 of the numbers are created from a list of multiple jobs and the season they occur in. For example:
Number: G3247156302 can correspond with a list of 'summer' jobs (so any job on the list that occurs between april and november) and similarly G3207156302 can correspond with the same list of jobs in 'winter'

I have this working so that the numbers are associated properly, but I cannot get them to create one total price, they show up as the price for each job (without showing the job). I'm trying to create a totals box that will sum up these numbers...

IIf (([Queries]![qryGLUsed]![GL] = "G-320-715-6302") OR ([Queries]![qryGLUsed]![GL] = "G-324-715-6302"), DSUM(qryGLused.Price)

... I am getting a syntax error, I am also not sure if this will show the prices of the jobs that correspond with other numbers.
Any help will be greatly appreciated.

Thanks.
ConfusedA
 
Missing a closing parenthesis from the IIF is the first problem. However i don't think it is what youwant anyway.

Entries with other ledgers will show null.
The DSum will total the Price field of every record regardless of their ledger.

If you want to total only those particular ledger prices, add a column to the query with the IIF statement as as its field expression. Except drop the DSUM part of the true argument.

Then SUM the new field in the Report.
 
Thank you for the prompt response. Your answer is much clearer for what I am trying to accomplish. I would love to say it works like a charm, but I appear to have hit a snag.
I used the syntax: IIf(([Queries]![qryGLUsed]![GL]="G-320-715-6302") Or ([Queries]![qryGLUsed]![GL]="G-324-715-6302"),[Queries]![qryGLused]![Price],"*")

Which allows me to place "*" in all of the non- responses, but for some reason I am unable to get a display of the price when GL = G-320-715-6302 or G-324-715-6302, these two values do exist and I think that the code you helped me create is accurate, so I am unsure as to why they are not being picked up, am I missing something in my syntax?

Cheers,
A
 
Nevermind, I figured it out. I appreciate your help!
 

Users who are viewing this thread

Back
Top Bottom