sir i have some data to display in gridview, but in that some columns i need show vertically and some are in horizontally.
here is my query
Select o.OId,o.OrderNo,o.BillDate,SUM(o.SoldQty * p.MsPack) as SoldQty,sl.PersonName,a.Beat,o.CustomerOutlet,p.SFPCode,p.SFPName,p.UOM,oc.SifiCCode,oc.Name from orderdetails o INNER JOIN products p, salespersons sl,custromeroutlets oc,area a where o.BranchCode=bcode AND o.SalesCode=sl.SPCode AND o.SalesCode=spcode AND o.CustomerOutlet=oc.CCode AND oc.SPCode=sl.SPCode AND o.ProductCode=p.PCode AND o.BillDate >=fdate AND o.BillDate <=tdate AND a.AreaCode=oc.Area group by p.PCode,o.CustomerOutlet
order by p.PCode;
Select o.OId,o.OrderNo,o.BillDate,SUM(o.SoldQty * p.MsPack) as SoldQty,sl.PersonName,a.Beat,o.CustomerOutlet,p.SFPCode,p.SFPName,p.UOM,oc.SifiCCode,oc.Name from orderdetails o INNER JOIN products p, salespersons sl,custromeroutlets oc,area a where o.BranchCode=bcode AND o.SalesCode=sl.SPCode AND o.SalesCode=spcode AND o.CustomerOutlet=oc.CCode AND oc.SPCode=sl.SPCode AND o.ProductCode=p.PCode AND o.BillDate >=fdate AND o.BillDate <=tdate AND a.AreaCode=oc.Area group by p.PCode,o.CustomerOutlet
order by p.PCode;
here is the current output

but i need the output like this (expected output)
