On some records, the calculation is correct but on others it is wrong, why?
the calculation is as follows (the source of each part of the calculation is
below it):
txtActualWage =[txtLaborRevenue]\[txtTotalHours]
txtLaborRevenue =rptLaborSubReport!TotalLaborCost
TotalLaborCost =Sum((DateDiff("n",[StartTime],[EndTime])/60)*[Pay])
txtTotalHours
=IIf(IsError(rptLaborSubReport!txtTotalHours),0,rp tLaborSubReport!txtTotalHours)
txtTotalHours =Sum(DateDiff("n",[StartTime],[EndTime])/60)
So in example one...
txtActualWage =[txtLaborRevenue]\[txtTotalHours]
$25.00 $912.50 36.50
in example two...
txtActualWage =[txtLaborRevenue]\[txtTotalHours]
$23.00 $187.50 7.50
why is this wrong? are my calculation to complex? using too many calculated
controls for the end result?
Any guidance greatly appreciated. 6 1622
Kevin wrote:
On some records, the calculation is correct but on others it is wrong, why?
the calculation is as follows (the source of each part of the calculation is
below it):
txtActualWage =[txtLaborRevenue]\[txtTotalHours]
txtLaborRevenue =rptLaborSubReport!TotalLaborCost
TotalLaborCost =Sum((DateDiff("n",[StartTime],[EndTime])/60)*[Pay])
txtTotalHours
=IIf(IsError(rptLaborSubReport!txtTotalHours),0,rp tLaborSubReport!txtTotalHours)
txtTotalHours =Sum(DateDiff("n",[StartTime],[EndTime])/60)
So in example one...
txtActualWage =[txtLaborRevenue]\[txtTotalHours]
$25.00 $912.50 36.50
in example two...
txtActualWage =[txtLaborRevenue]\[txtTotalHours]
$23.00 $187.50 7.50
why is this wrong? are my calculation to complex? using too many calculated
controls for the end result?
Any guidance greatly appreciated.
What if there are no hours, i.e. Salary Employee?
Are you pulling in your labor revenue and your total hours separately so
that you can be sure the are pulling in correctly?
"Kevin" <no**@email.comwrote in message
news:xc*********************@fe07.news.easynews.co m...
On some records, the calculation is correct but on others it is wrong,
why?
the calculation is as follows (the source of each part of the calculation
is below it):
txtActualWage =[txtLaborRevenue]\[txtTotalHours]
txtLaborRevenue =rptLaborSubReport!TotalLaborCost
TotalLaborCost =Sum((DateDiff("n",[StartTime],[EndTime])/60)*[Pay])
txtTotalHours
=IIf(IsError(rptLaborSubReport!txtTotalHours),0,rp tLaborSubReport!txtTotalHours)
txtTotalHours =Sum(DateDiff("n",[StartTime],[EndTime])/60)
So in example one...
txtActualWage =[txtLaborRevenue]\[txtTotalHours]
$25.00 $912.50 36.50
in example two...
txtActualWage =[txtLaborRevenue]\[txtTotalHours]
$23.00 $187.50 7.50
why is this wrong? are my calculation to complex? using too many
calculated controls for the end result?
Any guidance greatly appreciated.
Are you pulling in your labor revenue and your total hours separately so
that you can be sure the are pulling in correctly?
yes...
>txtActualWage =[txtLaborRevenue]\[txtTotalHours]
txtLaborRevenue pulls from a calc control on rptLaborSubreport,
TotalLaborCost. This calculated control, TotalLaborCost uses the
calculation - =Sum((DateDiff("n",[StartTime],[EndTime])/60)*[Pay])
and txtTotalHours is from the same subreport, a control named txtTotalHours
which uses the following calculation -
=IIf(IsError(rptLaborSubReport!txtTotalHours),0,rp tLaborSubReport!txtTotalHours)
I toyed with the idea of a rounding discrpency but that doesnt seem to fit.
The data type for the various fields are appropriate; StartTime EndTime are
both Date/Time fields, Pay is a currency field. As for the formatting of the
calculated controls; txtTotalHours is Fixed with 2 decimals, txtLaborRevenue
is Currency and txtActualWage is currency.
I'm not sure I see where this is relevent to the question at hand?
"Last Boy Scout" <Ba*****@whitehouse.govwrote in message
news:_Q************@newsfe03.lga...
What if there are no hours, i.e. Salary Employee?
So if you have your two fields pulling in correctly, the revenue field and
the hours field, have you tried running your calculation from these two
fields and not pulling the information from the subreport?
"Kevin" <no**@email.comwrote in message
news:da*********************@fe08.news.easynews.co m...
>Are you pulling in your labor revenue and your total hours separately so that you can be sure the are pulling in correctly?
yes...
>>txtActualWage =[txtLaborRevenue]\[txtTotalHours]
txtLaborRevenue pulls from a calc control on rptLaborSubreport,
TotalLaborCost. This calculated control, TotalLaborCost uses the
calculation - =Sum((DateDiff("n",[StartTime],[EndTime])/60)*[Pay])
and txtTotalHours is from the same subreport, a control named
txtTotalHours which uses the following calculation -
=IIf(IsError(rptLaborSubReport!txtTotalHours),0,rp tLaborSubReport!txtTotalHours)
I toyed with the idea of a rounding discrpency but that doesnt seem to
fit. The data type for the various fields are appropriate; StartTime
EndTime are both Date/Time fields, Pay is a currency field. As for the
formatting of the calculated controls; txtTotalHours is Fixed with 2
decimals, txtLaborRevenue is Currency and txtActualWage is currency.
Rather than using the calculation =[txtLaborRevenue]\[txtTotalHours], I
substitued the formulas from the calculated fields on my report
(txtLaborRevenue & txtTotalHours) and the calculations are correct. What
would account for the discrepency? Could this be a rounding issue?
"Scott" <sc**********@ns.sympatico.cawrote in message
news:2y********************@ursa-nb00s0.nbnet.nb.ca...
So if you have your two fields pulling in correctly, the revenue field and
the hours field, have you tried running your calculation from these two
fields and not pulling the information from the subreport?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: CSDunn |
last post by:
Hello,
I have a situation in which each record on a report has 40 fields, any
one of which can contain a value of 'C', or 'I', or 'B'. I need to
create one calculated field on the report that will...
|
by: Robin Cushman |
last post by:
Hi all,
I need some help -- I'm working with an A2K database, using DAO, and
am trying to read records into a Crystal Report and then export it to
a folder on our network as an Excel...
|
by: Richard Hollenbeck |
last post by:
I have a report that displays the final grade for each students in a course
in the body of the report, in a text box called "txtAvg".
Now I want the report to display number of As, Bs, Cs, Ds,...
|
by: Jessica |
last post by:
I have a database where a person is able to enter the different tasks
they do each day by specific department and matter.
On a form they enter the date, their name, and their title; in a
subform...
|
by: Richard Hollenbeck |
last post by:
The following query takes about one second to execute with less than 1,000
records, but the report that's based on it takes from 15-30 seconds to
format and display. That's frustrating for both me...
|
by: prabhukalyan |
last post by:
Hi all,
I am not so good in queries. here is my problem
2 tables to store the received items (fabric)-- inwardmaster,
inwarddetails
and after some processing (Dyeing)
the items were...
|
by: jmar |
last post by:
I posted a week ago and received one response. I'm looking for the
opinion of several experienced .NET people before I proceed so I'm
posting again. Sorry for the repost...
I am updating a...
|
by: Greg |
last post by:
Most suggestions on this topic recommend to use a page footer and make
it visible only on the last page. My problem is that the footer is half
of the height of a page which means the detail would...
|
by: Sunil Korah |
last post by:
Hi,
I haven't used access reports much. I have a problem in getting the
total of a group.
I have 3 fields, ProgName (Program name), Pname (Participant's name)
and PCategory (Participant...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |