|
-
Apr 3rd, 2006, 09:56 AM
#1
Thread Starter
Addicted Member
CrossTab Query in Access report
Hi all,
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 ..
VB Code:
"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,
Nilesh Thakur. 
-
Apr 4th, 2006, 02:43 AM
#2
Thread Starter
Addicted Member
Re: CrossTab Query in Access report
Nilesh Thakur. 
-
Apr 4th, 2006, 03:38 AM
#3
Re: CrossTab Query in Access report
You can use an IIF statement in your sql query to evaluate if it is null replace it with a "0".
VB Code:
IIF(IsNull([OrderDetails].[Size]), 0, [OrderDetails].[Size])
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|