Hi All
In an OLAP report, I would like to pass a blank default value for a column something like #prompt('Param_Col','token','')#
instead of #prompt('Param_Col','token','[Hub Cube].[Listing (All)].[Listing (All)].[Product]')#.However, the report fails with parsing error.
How do I pass a default value
Regards
Raj
Do I need to use emptySet function..Please help !!
this worked for me:
#prompt('test','token','[My Package].[Time].[Time].[Month]')#
Quote from: raj_aries81 on 12 Jun 2014 02:40:39 PM
Hi All
In an OLAP report, I would like to pass a blank default value for a column something like #prompt('Param_Col','token','')#
instead of #prompt('Param_Col','token','[Hub Cube].[Listing (All)].[Listing (All)].[Product]')#.However, the report fails with parsing error.
How do I pass a default value
Regards
Raj
Hi,
There is no concept of a member being blank in an OLAP cube. What exactly are the requirements for putting blank in as a default value? Would it make sense to use the root member of the dimension as the default?
Cheers!
MF.
I'm no macro expert, but if you just want a null:
if ( #sq(prompt('your prompt', 'token', 'default text'))# = 'default text') then (null) else ([something else])
I make no claims as to how the OLAP query engine would handle the null member. It would probably drop it from your crosstab container.
Anyhow, you MUST include the 3rd parameter (default text) if you don't want a prompt page to show up. But as I did, just put it in an if then else, and set it's result to null if the default text is submitted as the response for your prompt.
This is for a drill-through? If so, I have found the easiest thing for a default value is to allow the parameter to be missing (null) in the target. Then, in the target report, check the parameter with filter() or a prompt macro to set the default value if the parameter is null. I have mostly used this technique with date parameters, but other data types should also work.