cognos 10.2.2
ok new to prompt macros trying to figure this out
I have these 2 case statements as data items i am trying to figure out the prompt macro syntax just can get it .. HELP!!! plz
CASE WHEN ?Option? = 1 THEN [Rank Gross Profit] When ?Option? = 2 Then [Rank Revenue] end
CASE WHEN ?Option? = 1 and [Rank Gross Profit] < ?RARF? THEN [QryRank].[Gross profit] When ?Option? = 2 and [Rank Revenue] < ?RARF? Then [QryRank].[Revenue] end
attached is html
I tried this it did not work :
CASE WHEN 1 then #prompt('Option','integer','[Rank Gross Profit]')#
When 2 then #prompt('Option','integer','[Rank Revenue]')#
end
#
CASE prompt('Option','integer')
WHEN 1 then '[Rank Gross Profit]'
When 2 then '[Rank Revenue]'
end
#
So, in this example, if Option param = 1, the data item would wind up [Rank Gross Profit]
Thank you rockytopmark