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

AS OF month-year displayed in Report Title

Started by lporter, 22 Jun 2011 10:45:40 AM

Previous topic - Next topic

lporter

I have a crosstab report (Cognos8) that compares values current YTD to prior YTD.  The report has 2 prompts - ?Last Calendar Year? and ?Last Calendar Month? where Calendar Month is the month number.  There are then 2 filters: Calendar Year >= (?Last Calendar Year?) and Calendar Month <= (?Last Calendar Month?).  I want to display the values entered for the prompts in the report title with 'As Of MMM,YYYY'.  This also means I would need to convert the Month Number to the Month Name, and add one year to the value entered in the Year Prompt.  How would I display the prompt values, convert the month value and calculate the year value?

PRIT AMRIT

'As Of'+' '+
case ParamDisplayValue('Mth')
when '1' then 'JAN'
when '2' then 'FEB'
-----
-----
when '12' then 'DEC'
end
+','+
number2string(string2int32(ParamDisplayValue('Yr'))+1)


Replace Year & Month parameter as in your report. Hope it resolves?

Thanks

lporter

How am I inserting this code into the header - as a Query Calculation?  I can insert the 'As Of:' as a Text Item, but am not sure how to insert the code.

lporter

Actually, I tried this code as a Query Calculation, but get the error that the function ParamDisplayValue is not supported (using DB2). :(

Lynn

I believe that would be a layout calculation