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

How to Pass a Blank default Value in Prompt Macro for OLAP Report

Started by raj_aries81, 12 Jun 2014 02:40:39 PM

Previous topic - Next topic

raj_aries81

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

raj_aries81


Francis aka khayman

this worked for me:

#prompt('test','token','[My Package].[Time].[Time].[Month]')#

MFGF

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.
Meep!

MDXpressor

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.
No, a proof is a proof. What kind of a proof? It's a proof. A proof is a proof, and when you have a good proof, it's because it's proven.

-Jean Chretien

bdbits

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.