Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No data report

Status
Not open for further replies.

softbrix2

Technical User
Feb 28, 2005
17
US
Hello, I'm using a modified invoice report from the sample invoice.mdb that comes with access 2002, If my order dosen't have any Product (only labor,) then my report cancel. how can I get it to print regardless os products or not. Please look at my joins cause I think thats where the problems is.

SELECT Orders.*, [Order Details].OrderDetailID, [Order Details].ProductID, [Order Details].Quantity, [Order Details].UnitPrice, [Order Details].Discount, Customers.CompanyName, Customers.ContactFirstName, Customers.ContactLastName, Customers.BillingAddress, Customers.City, Customers.StateOrProvince, Customers.PostalCode, Customers.[Country/Region], Customers.PhoneNumber, Customers.ContactFirstName & " " & Customers.ContactLastName AS [Contact Name], Products.ProductName, CLng(([Quantity]*[order details].UnitPrice)*([Discount])*100)/100 AS Htotal, ([NoStaff]*[Hrs]*[StaffRate])+([NoStaff]*[Whrs]*[WstaffRate]) AS ltotal, (CLng([Quantity]*[order details].UnitPrice*(1-[Discount])*100)/100) AS ptotal, CLng(([Quantity]*[order details].UnitPrice)*(1+[Discount])*100)/100 AS [Line Total], [Order Details].notes
FROM Products INNER JOIN ((Customers RIGHT JOIN (Employees RIGHT JOIN Orders ON Employees.EmployeeID = Orders.EmployeeID) ON Customers.CustomerID = Orders.CustomerID) RIGHT JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID) ON Products.ProductID = [Order Details].ProductID;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top