COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: mrcool on 23 May 2011 08:09:57 PM

Title: Optional Prompt macro
Post by: mrcool on 23 May 2011 08:09:57 PM
Hi All,
The following macro is failing could you please help me in resolving the single quotes in pretext.

#promptmany('QuoteMethod',
'token',
' ',
'AND (Case When Quote_Assess.QUOTE_COUNT=1 Then 'Single Quote' Else 'Competitive Quote' End)  IN (', '', ')'
)#

Thanx in adavance

Cheers
Mrcool
Title: Re: Optional Prompt macro
Post by: CognosPaul on 26 May 2011 02:57:17 AM
You can use the SQ function to wrap the strings in quotes.

#promptmany('QuoteMethod',
'token',
' ',
'AND (Case When Quote_Assess.QUOTE_COUNT=1 Then ' + sq('Single Quote') + ' Else ' + sq('Competitive Quote') + ' End)  IN (', '', ')'
)#