Calculating on reports

Chief

Registered User.
Local time
Today, 08:42
Joined
Feb 22, 2012
Messages
156
Hello, (I'm a Novice) Access 2010

I have supplied screen shots for you information.

Trying to compile a report with total number of jobs, Total invoice amount, and Average amount. These three I believe(to the best of my ability) are working.
Total Jobs: Control Source =Sum(1)
Total Invoice Amount: Control Source =Sum([invoice_amount])
Avg Invoice Amount: Control Source =Sum([invoice_amount])/Sum(1)

I am having the following issues though on further breakdowns:
What i want to achieve:
1/ I want to know how may jobs are RTA and How many jobs are Assembled.
This is indicated by a check box, ticked if assembled.
What I have done but errors:
RTA Jobs: Control Source =Sum([Assembled]=False)
Assembled Jobs: Control Source =Sum([Assembled]=True)
This I believe is working however returns a negative number.

2/ I want to breakdown the invoice amount of RTA Jobs and Assembled Jobs.
What I have done but errors:
RTA Jobs $: Control Source =DSum("[invoice_amount]","rptFSales","[Assembled]"=False)
Assembled Jobs $: Control Source =DSum("[invoice_amount]","rptFSales","[Assembled]"=True)
I get the following issue on the report: #Type!

3/ Then the average $ of RTA Jobs and Assembled Jobs.
I have not attempted this due to the errors in question 2/.

4/ I want to show the date ranges that are selected from the reports screen, see screenshot - salesforecast03. on the report.
Not sure how to copy/reference this.

Appreciate your assistance, if i have not supplied enough detail please let me know.
thank you
Jason
 

Attachments

  • salesforecast01.jpg
    salesforecast01.jpg
    34.2 KB · Views: 146
  • salesforecast02.jpg
    salesforecast02.jpg
    99.3 KB · Views: 144
  • salesforecast03.jpg
    salesforecast03.jpg
    50.5 KB · Views: 136
Jason you don't look to sum a checkbox control but you can use a count function.

=Count(IIF(Nz([Field], 0) = -1, 1, Null))
 
Jason you don't look to sum a checkbox control but you can use a count function.

=Count(IIF(Nz([Field], 0) = -1, 1, Null))

Thanks Trevor,
Is this to count the jobs that are checked?
If so what do I change it to for jobs that are NOT checked?

Is this correct?
=Count(IIf(Nz([Assembled],0)=0,1,Null))
Yes is -1 and No is 0??

Are you able to assist with any of the other issues?

Appreciate your input, thank you.
Jason.
 
Last edited:
I have made some changes and I think i have things working. Can someone clarify please.

2/ I want to breakdown the invoice amount of RTA Jobs and Assembled Jobs.
RTA Jobs: =Sum(IIf([Assembled]=0,[invoice_amount],0))
Assembled Jobs: =Sum(IIf([Assembled]=-1,[invoice_amount],0))

what i am still to work out is the average parts #3/

thanks
Jason
 
Solved the date issue 4/
with =[Forms]![reports_list]![txtTo]

This is most likely all basic stuff, but have to start somewhere..
 

Users who are viewing this thread

Back
Top Bottom