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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Rows To Column

Status
Not open for further replies.

taree

Technical User
May 31, 2008
316
0
0
US
Is is possible to convert rows to columns using CR XI and oracle 10i
the number of rows is unknown. sometimes we have five vendors bid for the job. sometime we have one or two or many vendors bid for the job. please let me know how this can be done. thank you
 
You could insert a crosstab in the report header or report footer and use the vendor field as the column field.

-LB
 
thank you lbass for the reply. so far I do not have a luck with this thing.

here is my reprot looks like:
Code:
BIDPRICE	CALL	IPLINENO	LETTING	VENDOR
9,585	021	0010	10021200	C0104         
1,000	021	0020	10021200	C0104         
1,000	021	0030	10021200	C0104         
17	021	0040	10021200	C0104         
5	021	0050	10021200	C0104         
11,420	021	0010	10021200	K0054         
1,100	021	0020	10021200	K0054         
1,100	021	0030	10021200	K0054         
5	021	0040	10021200	K0054         
3	021	0050	10021200	K0054         
8,010	021	0010	10021200	V070          
900	021	0020	10021200	V070          
1,320	021	0030	10021200	V070          
11	021	0040	10021200	V070          
3	021	0050	10021200	V070   



and this is what I would like to achieve

CALL	IPLINENO	LETTING	C0104    	K0054         	V070          
021	0010	10021200	9,585	11,420	8,010
021	0020	10021200	1,000	1,100	900
021	0030	10021200	1,000	1,100	1,320
021	0040	10021200	17	5	11
021	0050	10021200	5	3	3
 
Insert a crosstab and add the Call, IPLineNo, and Letting fields as row fields, add vendor as the column field, and use bidprice as the summary field. In order to eliminate unwanted subtotals for the various rows, go into the customize style tab, select the row field, and check "suppress subtotal". If you need the row fields to repeat for each row, then change the order of the rows so that IPLineNo is the first row.

-LB
 
thank you lbass for your response again. I would like Call, IPLineNo, and Letting to be column as well like this. is this possible to do like the one I have below.It kind of screwed up when I add additional field as column in the report. thank you

Code:
CALL    IPLINENO    LETTING    C0104        K0054             V070          021    0010    10021200    9,585    11,420    8,010021    0020    10021200    1,000    1,100    900021    0030    10021200    1,000    1,100    1,320021    0040    10021200    17    5    11021    0050    10021200    5    3    3
 
I am sorry the sample report does not look right. here is the correct format.
Code:
CALL	IPLINENO	LETTING	C0104         	 K0054         	V070          
021	0010	10021200	9,585	11,420	8,010
021	0020	10021200	1,000	1,100	900
021	0030	10021200	1,000	1,100	1,320
021	0040	10021200	17	5	11
021	0050	10021200	5	3	3
 
Please try inserting the crosstab as I suggested initially. I don't think you tried it, as it would have given you the above result--with the exception that the call field would not duplicate for every row unless you changed the order of the row fields.

Alternatively, you could create a manual crosstab if you will always have the same vendors and only a few of them.

-LB
 
Thank you. I tried your suggestion and it is almost what I wanted. the only thing that is missing is that the column name for call, iplineno and letting. how can I display the column name for the above three?


C0104 K0054 V070 Total
021 0010 10021200 9,585.00 11,420.00 8,010.00 29,015.00
0020 10021200 1,000.00 1,100.00 900.00 3,000.00
0030 10021200 1,000.00 1,100.00 1,320.00 3,420.00
0040 10021200 17.00 5.00 10.90 32.90
0050 10021200 5.00 3.00 2.50 10.50
Total 11,607.00 13,628.00 10,243.40 35,478.40
 
Will your crosstab continue on multiple pages? Or do the number of columns create virtual pages to the right?

-LB
 
thank you lbass, I think I got it know. I used textobject to add a column name for call, ipline and letting. thank you for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top