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

dynamically column names and the best way to do it

Started by sspk, 29 Jan 2008 10:11:36 AM

Previous topic - Next topic

sspk

Hi,
i have to generate a report which will have data-items like data_year,data_month(it will have past 24 months data in it),trx_data_bucket1....
Now  if data_month= NOV 2007  then i need to display trx_data_bucket1=NOV-07
trx_data_bucket2=oct-07,
trx_data_bucket3=sep-07
..
i.e when ever the data_month changes the  trx_data_bucket names has to change accordingly.
(sorry if i was not clear in explaning u guys, i am new to cognos)

Suraj

#1
do you have trx_data_bucket in the table or you are going to create it in report?
If you don't have it in table, i'll suggest to add these so that you don't have to calculate them in report.
Otherwise, you have to calculate them using a long case statement similar to...
case
when month = nov and year = 2007 then trx_data_bucket1
when month = oct and year = 2007 then trx_data_bucket2
when .... etc...

sspk

Hi,
thank you for giving reply and i am sorry for not giving proper info
i have the trx_data_buckets in the table and one more thing in the report
when data_month =NOV 2007 then trx_data_bucket1=nov-07,trx_data_bucket2=oct-07,trx_data_bucket3=sep-07....
when data_month=OCT 2007 then trx_data_bucket1=oct-07,trx_data_bucket2=sep-07,trx_data_bucket3=aug-07....
when data_month=SEP 2007 then trx_data_bucket1=sep-07,trx_data_bucket2=aug-07,trx_data_bucket3=jul-07....
I have a prompt on data_month so when i select a month it should display as above.