D
DMWM
Hi,
Im very stuck on this. I have an invoice report which shows customer details
and a subreport that shows the products they have ordered. the sql for each
looks like this:
Invoice
SELECT tblCustomer.Account_Contact, tblCustomer.Company_Name,
tblCustomer.Account_Contact_Number, tblCustomer.Invoice_Address1,
tblCustomer.Invoice_Address2, tblCustomer.Invoice_Address3,
tblCustomer.Invoice_Address4, tblCustomer.Invoice_Postcode, tblJob.Job_ID,
tblJob.Purchase_Order_Number, tblJob.Invoiced_Date, tblJob.Payment_Date,
tblJob.Order_Notes, tblCustomer.Customer_ID
FROM tblCustomer INNER JOIN tblJob ON tblCustomer.Customer_ID =
tblJob.Customer_ID;
Subreport - Products
SELECT tblProducts_Quoted.Quantity, tblProducts_Quoted.Item_Specifics,
tblProducts.Product_Name, tblProducts.Product_Description,
tblProducts.Product_Size, tblProducts.Product_Colour,
tblProducts_Quoted.Job_ID, [Actual_Price]*[Quantity]*([tblVAT.VAT_Rate]/100)
AS VAT, [Actual_Price]*[Quantity] AS Price
FROM (tblVAT INNER JOIN tblProducts ON tblVAT.VAT_ID =
tblProducts.Product_VAT_ID) INNER JOIN tblProducts_Quoted ON
tblProducts.Product_ID = tblProducts_Quoted.Product_ID;
The totals for VAT and Price are in the report footer.
What i need to do is make sure that the VAT only calculates for customers
that are not VAT exempt. i.e. when they are i want the report footer total or
the VAT part of the subquery to read 0. I've tried linking the customer vat
rate in via the underlying query but it has not seemed to work as the
subquery then shows all products ordered by all customers on each invoice.
Any pointers would be great thankyou.
DMWM
Im very stuck on this. I have an invoice report which shows customer details
and a subreport that shows the products they have ordered. the sql for each
looks like this:
Invoice
SELECT tblCustomer.Account_Contact, tblCustomer.Company_Name,
tblCustomer.Account_Contact_Number, tblCustomer.Invoice_Address1,
tblCustomer.Invoice_Address2, tblCustomer.Invoice_Address3,
tblCustomer.Invoice_Address4, tblCustomer.Invoice_Postcode, tblJob.Job_ID,
tblJob.Purchase_Order_Number, tblJob.Invoiced_Date, tblJob.Payment_Date,
tblJob.Order_Notes, tblCustomer.Customer_ID
FROM tblCustomer INNER JOIN tblJob ON tblCustomer.Customer_ID =
tblJob.Customer_ID;
Subreport - Products
SELECT tblProducts_Quoted.Quantity, tblProducts_Quoted.Item_Specifics,
tblProducts.Product_Name, tblProducts.Product_Description,
tblProducts.Product_Size, tblProducts.Product_Colour,
tblProducts_Quoted.Job_ID, [Actual_Price]*[Quantity]*([tblVAT.VAT_Rate]/100)
AS VAT, [Actual_Price]*[Quantity] AS Price
FROM (tblVAT INNER JOIN tblProducts ON tblVAT.VAT_ID =
tblProducts.Product_VAT_ID) INNER JOIN tblProducts_Quoted ON
tblProducts.Product_ID = tblProducts_Quoted.Product_ID;
The totals for VAT and Price are in the report footer.
What i need to do is make sure that the VAT only calculates for customers
that are not VAT exempt. i.e. when they are i want the report footer total or
the VAT part of the subquery to read 0. I've tried linking the customer vat
rate in via the underlying query but it has not seemed to work as the
subquery then shows all products ordered by all customers on each invoice.
Any pointers would be great thankyou.
DMWM