Skip to Content
0
Former Member
Jan 28, 2014 at 07:30 AM

manual crosstab report

19 Views

I want result like this in crosstab report in crystal report 2010

Product No. Order Qty Total Received Warehouse 1 Warehouse2 Warehouse3

001 100 100 50 50 0

002 100 50 0 0 50

select

P.ProductCode as 'Product No',

Po.Qty as 'Order Qty',

sum(G.Qty) as 'Total Receipt'

from

dbo.mProduct P

inner join dbo.txPurchaseOrder Po on Po.ProductID=P.ProductID

inner join dbo.txGRN G on G.ProductID=P.ProductID

But Warehouse is different table ,ow can i show the warehouse as table header

select

W.WarehouseName

from dbo.mWarehouse W

inner join dbo.tmGRN G on G.FromWareHouseID=W.WarehouseID