If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Display rows as columns

Started by cogloose, 10 Feb 2010 04:58:10 AM

Previous topic - Next topic

cogloose

Hi

We have a user who would like to see their data spread over columns rather than rows so;
Customer ID 1   Customer Name 1   Item ID 1   Item Name 1
Customer ID 1   Customer Name 1   Item ID 2   Item Name 2
Customer ID 1   Customer Name 1   Item ID 3   Item Name 3
Customer ID 1   Customer Name 1   ..   ..
Customer ID 1   Customer Name 1   Item ID n   Item Name n
Customer ID 2   Customer Name 2   Item ID 1   Item Name 1
Customer ID 2   Customer Name 2   Item ID 2   Item Name 2
Customer ID 2   Customer Name 2   Item ID 3   Item Name 3
Customer ID 2   Customer Name 2   Item ID n   Item Name n

becomes;
Customer ID 1   Customer Name 1   Item ID 1   Item Name 1   Item ID 2   Item Name 2   Item ID 3   Item Name 3   ..   ..   Item ID n   Item Name n
Customer ID 2   Customer Name 2   Item ID 1   Item Name 1   Item ID 2   Item Name 2   Item ID 3   Item Name 3   ..   ..   Item ID n   Item Name n

ie all the data all on one row for each customer.
The problem being there are an unknown number of items per customer. I've tried using a crosstab in a list but seems very inefficient, does anyone have a tried and tested way to do this?
Any help would be appreciated

MFGF

Hi,

You could try using a repeater within your list to display the Item IDs and Names, linked back to the list query via a master/detail relationship on Customer ID.  You would need to add spaces or commas between the items within the repeater too, or else they would end up as one long string.

Regards,

MF.
Meep!

cogloose

Thanks, think that will work.