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 =rptLaborSubRep ort!TotalLaborC ost
TotalLaborCost =Sum((DateDiff( "n",[StartTime],[EndTime])/60)*[Pay])
txtTotalHours
=IIf(IsError(rp tLaborSubReport !txtTotalHours) ,0,rptLaborSubR eport!txtTotalH ours)
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 1644
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 =rptLaborSubRep ort!TotalLaborC ost
TotalLaborCost =Sum((DateDiff( "n",[StartTime],[EndTime])/60)*[Pay])
txtTotalHours
=IIf(IsError(rp tLaborSubReport !txtTotalHours) ,0,rptLaborSubR eport!txtTotalH ours)
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.com wrote in message
news:xc******** *************@f e07.news.easyne ws.com...
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 =rptLaborSubRep ort!TotalLaborC ost
TotalLaborCost =Sum((DateDiff( "n",[StartTime],[EndTime])/60)*[Pay])
txtTotalHours
=IIf(IsError(rp tLaborSubReport !txtTotalHours) ,0,rptLaborSubR eport!txtTotalH ours)
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...
>txtActualWag e =[txtLaborRevenue]\[txtTotalHours]
txtLaborRevenue pulls from a calc control on rptLaborSubrepo rt,
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(rp tLaborSubReport !txtTotalHours) ,0,rptLaborSubR eport!txtTotalH ours)
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*****@whiteh ouse.govwrote in message
news:_Q******** ****@newsfe03.l ga...
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.com wrote in message
news:da******** *************@f e08.news.easyne ws.com...
>Are you pulling in your labor revenue and your total hours separately so that you can be sure the are pulling in correctly?
yes...
>>txtActualWa ge =[txtLaborRevenue]\[txtTotalHours]
txtLaborRevenue pulls from a calc control on rptLaborSubrepo rt,
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(rp tLaborSubReport !txtTotalHours) ,0,rptLaborSubR eport!txtTotalH ours)
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
(txtLaborRevenu e & txtTotalHours) and the calculations are correct. What
would account for the discrepency? Could this be a rounding issue?
"Scott" <sc**********@n s.sympatico.caw rote in message
news:2y******** ************@ur sa-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 COUNT the number
of fields with a value of 'C'(and shows the integer result), and
another calculation that will take the COUNT of the fields with a
value of 'C' and divide that by the total number of fields. The second
calculation would be...
|
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 spreadsheet. I'm having trouble
with my code at the point at which it hits ".ReadRecords" -- the
module just runs and runs without generating anything. I've gotten
this code to correctly save .rpt files without any data, but not with
data, nor have I been...
|
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, and Fs. and the
average grade and median grade, and perhaps a bar chart. The report is
called "rptStudentAverages." I tried the following as the control source in
a text box to display the number of Bs, for example, but, of course, it
doesn't...
|
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 they select from a drop down list what department/section this
task pertains to and then they select the matter they are discussing
or working on with that department. They enter the time they spent on
this matter and they also enter some more...
|
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 and the end user. The
report is a student grades sheet showing the results of all his/her
activities and final grade for all students in any course--one page per
student. Should I break this into several smaller queries? use DAO inside
the...
| |
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 deliverd and stored in tables -- deliverymaster,
deliverydetails
|
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 VB4.0 quote generation program to VB.net. The old
program takes user inputs, performs calculations, saves the data to
Access databases and uses Crystal Reports 5.0 to generate a quote. A
while back users obviously wanted to be able to edit/e-mail ...
|
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 show on only the
top half of each page with whitepace at the bottom of each page.
How can I get the detail to fill each page with my "half page height"
report footer at the bottom of the last page?
Any suggestions to solve this would be...
|
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 category)
PCategory can have values 'SC', 'ST' and 'Others'
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |