R
Regan via AccessMonster.com
Hi i'm trying to figure out how to put sub totals in my report, it doesn't
seem to be working
i seem to be able to do it for hours, but i can't sub-total the sub total
field.
Example of Report
FILE NUM 12342
Bob Jones
Peanut Catagory
EntryDate Details Hours
ChargeRate subtotal
01/01/2007 this is what i did today 2.2
$35 $77
02/01/2007 I didn't do this but i enter 10
$60 $600
subtotal *$677
Cashew Nut Catagory
etc etc
What i want to do is sub total the sub total So it shows where the * is
i can sum the hours =sum(hours)
But the same thing with subtotal =sum(subtotal) doesn't seem to work?!
(data type mismatch)
Here is the SQL behind the report.
SELECT tblFiles.FileID, tblFiles.FileNum, tblTimesheet.EntryDate, tblcontacts.
firstname & " " & tblcontacts.lastname AS Fullname, tblTimesheet.Details,
tblCodes.InvCatagory, tbltimesheet.units/10 AS Hours, IIf(tblcodes.
chargetype="code",tblcodes.chargerate,tblemployconf.chargeoutrate) AS
ChargeRate, Ccur(Format(tbltimesheet.units/10*IIf(tblcodes.chargetype="code",
tblcodes.chargerate,tblemployconf.chargeoutrate),'Currency')) AS SubTotal
FROM tblFiles INNER JOIN (tblContacts INNER JOIN (tblCodes INNER JOIN
(tblEmployees INNER JOIN (tblEmployConf INNER JOIN tblTimesheet ON
(tblEmployConf.EmployConfID = tblTimesheet.EmployconfID) AND (tblEmployConf.
EmployeeID = tblTimesheet.EmployeeID)) ON (tblEmployees.EmployeeID =
tblTimesheet.EmployeeID) AND (tblEmployees.EmployeeID = tblEmployConf.
EmployeeID)) ON tblCodes.CodeID = tblTimesheet.CodeID) ON tblContacts.
ContactID = tblEmployees.ContactID) ON tblFiles.FileID = tblTimesheet.FileID
WHERE not tblcodes.invCatagory <> Null or tblcodes.invcatagory <> "";
Any help would be great
Thanks in advance
--
Regan,
Paeroa
World famous in New Zealand
Message posted via AccessMonster.com
seem to be working
i seem to be able to do it for hours, but i can't sub-total the sub total
field.
Example of Report
FILE NUM 12342
Bob Jones
Peanut Catagory
EntryDate Details Hours
ChargeRate subtotal
01/01/2007 this is what i did today 2.2
$35 $77
02/01/2007 I didn't do this but i enter 10
$60 $600
subtotal *$677
Cashew Nut Catagory
etc etc
What i want to do is sub total the sub total So it shows where the * is
i can sum the hours =sum(hours)
But the same thing with subtotal =sum(subtotal) doesn't seem to work?!
(data type mismatch)
Here is the SQL behind the report.
SELECT tblFiles.FileID, tblFiles.FileNum, tblTimesheet.EntryDate, tblcontacts.
firstname & " " & tblcontacts.lastname AS Fullname, tblTimesheet.Details,
tblCodes.InvCatagory, tbltimesheet.units/10 AS Hours, IIf(tblcodes.
chargetype="code",tblcodes.chargerate,tblemployconf.chargeoutrate) AS
ChargeRate, Ccur(Format(tbltimesheet.units/10*IIf(tblcodes.chargetype="code",
tblcodes.chargerate,tblemployconf.chargeoutrate),'Currency')) AS SubTotal
FROM tblFiles INNER JOIN (tblContacts INNER JOIN (tblCodes INNER JOIN
(tblEmployees INNER JOIN (tblEmployConf INNER JOIN tblTimesheet ON
(tblEmployConf.EmployConfID = tblTimesheet.EmployconfID) AND (tblEmployConf.
EmployeeID = tblTimesheet.EmployeeID)) ON (tblEmployees.EmployeeID =
tblTimesheet.EmployeeID) AND (tblEmployees.EmployeeID = tblEmployConf.
EmployeeID)) ON tblCodes.CodeID = tblTimesheet.CodeID) ON tblContacts.
ContactID = tblEmployees.ContactID) ON tblFiles.FileID = tblTimesheet.FileID
WHERE not tblcodes.invCatagory <> Null or tblcodes.invcatagory <> "";
Any help would be great
Thanks in advance
--
Regan,
Paeroa
World famous in New Zealand
Message posted via AccessMonster.com