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

change column names dynamically

Started by sspk, 07 Feb 2008 09:10:21 AM

Previous topic - Next topic

sspk

  HI All,
Sorry for asking the question again (it's urgent)
i have to generate a report which will have data-items like data_year,data_month,trx_1,trx_2,....
i have the trx_data_buckets in the table itself
when data_month =NOV 2007 then trx_1=nov-07,trx_2=oct-07,trx_3=sep-07....
when data_month=OCT 2007 then trx_1=oct-07,trx_2=sep-07,trx_3=aug-07....
when data_month=SEP 2007 then trx_1=sep-07,trx_2=aug-07,trx_3=jul-07....
I have a prompt on data_month so when i select a month it should display as above.

Suraj

create a data item with a case statement and put in the column or column header depending upon what you want (labels or values).
case
when data_month =NOV 2007 then 'November 07'
when data_month=OCT 2007 then 'October 07'
when data_month=SEP 2007 then 'September 07'
...
else
end

sspk

Please can you explain it with steps,because i am not getting it

Suraj

Quote from: Suraj Neupane on 07 Feb 2008 09:22:36 AM
create a data item with a case statement and put in the column or column header depending upon what you want (labels or values).
case
when data_month =NOV 2007 then 'November 07'
when data_month=OCT 2007 then 'October 07'
when data_month=SEP 2007 then 'September 07'
...
else
end
After you create the data item,
1. if you want to add columns with that value, just drag and drop.
2. if you are just wanting to change the label of column header, click on the header, under properties-->text source-->Source type; change that to Data item value and below 'Data item value', select the new data item created above.
This will change the header.

sspk

Quote from: Suraj Neupane on 08 Feb 2008 10:29:24 AM
After you create the data item,
1. if you want to add columns with that value, just drag and drop.
2. if you are just wanting to change the label of column header, click on the header, under properties-->text source-->Source type; change that to Data item value and below 'Data item value', select the new data item created above.
This will change the header.

Thank you , very much,there is a problem whenever i am changing the colmn header name it is also changing the values in the column .I am doing like this
under properties--->aggregate function(none for column header)
        properties--->aggregate function(total for column body) and even in the case statement i had a problem
because data _month =11 it's not NOV 2007
can u help me out

Suraj

You need to change the column headers' display text only, not the data item.
select column header, properties, text source and specify what value you want to display in the header.