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

Custom Header in a crosstab

Started by Phil Scottow, 19 Mar 2013 09:42:19 AM

Previous topic - Next topic

Phil Scottow

Report Studio V10.1
I am trying to make a columns header in a crosstab dynamic.
So far. If I click on the column header and change text source > source Type from 'Member Caption' to 'Report expression' and do a simple Report Expression Today() all works well.
but when I try to extend this Report expression to _first_of_month (Today ())
I just get a CRX-API-0014
An invalid function argument type was found at or near the position '24' in the expression "_first_of_month (Today ()) ".

there must be a simple way around this. Can anyone advise me
Thanks

Phil Scottow

Well this is what I came up with. and it works. change the add months value as required.

case substring(timestamp2string (_add_months (_first_of_month (date2timestamp (Today ())),-12)),6,2)
when '01' then 'JAN'
when '02' then 'FEB'
when '03' then 'MAR'
when '04' then 'APR'
when '05' then 'MAY'
when '06' then 'JUN'
when '07' then 'JUL'
when '08' then 'AUG'
when '09' then 'SEP'
when '10' then 'OCT'
when '11' then 'NOV'
when '12' then 'DEC'
end
+' '+substring (timestamp2string (_add_months (_first_of_month (date2timestamp (Today ())),-12)),1,4)