PDA

Click to See Complete Forum and Search --> : CrossTab Query in Access report


nileshhthakur2004
Apr 3rd, 2006, 09:56 AM
Hi all, :bigyello:

i have genrated one CrossTab Query in Access which show me out put as

ProductName 1 L 1.86 L 2 L 2.5 L 3.87 L
---------------------------------------------------------------------
Herbal Botannical Drink 26 -- -- -- --
Herbal Botannical Drink 26 -- -- -- --
COMPV Fieldberry Drink 4
COMPV Fruit Punch Drink 4
COMPV Lite Fruit Punch Drink 0


i bind it on one reports it show me all records for all customer i want to show only related reords for that customreID one saprate pages..
my query is as follows ..

"TRANSFORM Sum(OrderDetails.RequestedQty) AS SumOfRequestedQty
SELECT OrderDetails.ProductName
FROM ((Customers INNER JOIN OrderHeaders ON Customers.CustomerID = OrderHeaders.CustomerID) INNER JOIN Products ON Customers.CustomerID = Products.CustomerID) INNER JOIN OrderDetails ON OrderHeaders.OrderNbr = OrderDetails.OrderNbr
GROUP BY Products.Size, Customers.CustomerID, OrderHeaders.OrderNbr, OrderDetails.OrderItemNbr, OrderDetails.ProductName, Customers.CompanyName
PIVOT OrderDetails.Size;"



How can i do this ??

also i want to display the value zero if no data is present for that filed

pls help me regarding this .
thanx and regards,

nileshhthakur2004
Apr 4th, 2006, 02:43 AM
come on pls help me...

RobDog888
Apr 4th, 2006, 03:38 AM
You can use an IIF statement in your sql query to evaluate if it is null replace it with a "0".
IIF(IsNull([OrderDetails].[Size]), 0, [OrderDetails].[Size])