Hi All,
I am using Cognos 10.2 and database is oracle relation database with DMR. We have a crosstab, where we have to render a crosstab column based on the selection of value prompt value? Where Duration static value prompt have values like below
Duration Static prompt below:
Use Value Display
[Namespace].[Dimension].[Time Hierar].[Month Lvl] Months
[Namespace].[Dimension].[Time Hierar].[Week Lvl] Week
[Namespace].[Dimension].[Time Hierar].[Day Lvl ] Day
I have created one data item with prompt macro below. But the I am always getting the default Month level defined. On top of it, I am getting Month display for other selection of Duration value prompt, where I am not getting drill up and drill down option on the Month column for Week and Day selection and level displayed in the column is also not correct.
#prompt ('?Duration?', 'token', '[Namespace].[Dimension].[Time Hierar].[Month Lvl]')#
I tried other options of case statements like below, but it throws error like corecsion level cannot be converted to string. Problem with the below statement is I am loosing out drill up and drill down functionality If I use the MemberSet directly in the then class.
Case
When (?Duration? = '[Namespace].[Dimension].[Time Hierar].[Month Lvl]')
then ([Namespace].[Dimension].[Time Hierar].[Month Lvl])
When (?Duration? = '[Namespace].[Dimension].[Time Hierar].[Week Lvl]')
then ([Namespace].[Dimension].[Time Hierar].[Week Lvl])
When (?Duration? = '[Namespace].[Dimension].[Time Hierar].[Day Lvl ]')
then ([Namespace].[Dimension].[Time Hierar].[Day Lvl ])
End
Can some one please let me know, how can I handle this or where am I doing wrong, please let me know your suggestions/guidance?
Thanks in advance.
Thanks & Regards,
XYZ
When you're using a prompt macro, get rid of the question marks:
#prompt ('Duration', 'token', '[Namespace].[Dimension].[Time Hierar].[Month Lvl]')#
Thank you very much Paul.
I don't understand, how can I miss such a silly mistake ;).
Your help is much appreciated.
Thanks & Regards,
XYZ