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 Chriss Miller 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 columns

Status
Not open for further replies.

lowbk

Technical User
Nov 26, 2001
162
SG
hi, i would like to ask how to display the rows in the database into columns on crystal reports.

eg my table structure is
person choicenumber fruit
peter 1 apple
peter 2 watermelon
peter 3 orange
john 1 apple
john 2 grapes
john 3 pineapples

person type contactnumber
peter handphone 12345678
peter residential 87654321
john handphone 456123787
john residential 98745612


i wish to display it in crystal reports as

person choice1 choice2 choice3 handphone residential
peter apple watermelon orange 12345678 87654321
john apple grapes pineapples 456123787 98745612


i have seen suggested solutions on concatenating the 3 choices into a textfield, but is it possible for each of the choices/ contact type to be a column field?

thanks

lowbk
 
Take a look at Crosstabs, Insert > Cross-Tab. They can do a lot, though it depends on your Crystal version, which it's helpful to give.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top