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

Macro prompt is not passing default value

Started by arroju_venkat, 26 Oct 2013 05:38:29 AM

Previous topic - Next topic

arroju_venkat

Hi,

In Cognos  10.2.1, when I applied macro prompt (Optional-filter) in report studio, is not passing the default value to the query and  is prompting me to enter a value.  If parameter value is not passed, all Productlines are being displayed.

[Sales (query)].[Products].[Product line]= #prompt('prm','text',"'Camping Equipment'")#

No prompt page is on my report and it should not prompt me for values, since default values is provided.

Could you please help me here.

MFGF

Hi,

Specifying a default value in a prompt macro does not prevent the prompt from being issued - it simply places the specified value into the parameter if the user doesn't enter anything. To get the report not to prompt at all initially, you need to add a prompt to the report page and specify a default selection for it (while making it optional).

The issue with all product lines being returned currently is that you have marked the filter as Optional. This means the report can completely bypass it if you click OK without entering anything in the generated prompt. If you change the filter to be Required, you will still be able to press OK without entering anything, but now the default value of the prompt function will be applied. You will still get prompted, though.

Regards,

MF.
Meep!

dmk.3678

Quote from: MFGF on 26 Oct 2013 07:54:57 AM
Hi,

Specifying a default value in a prompt macro does not prevent the prompt from being issued - it simply places the specified value into the parameter if the user doesn't enter anything. To get the report not to prompt at all initially, you need to add a prompt to the report page and specify a default selection for it (while making it optional).

The issue with all product lines being returned currently is that you have marked the filter as Optional. This means the report can completely bypass it if you click OK without entering anything in the generated prompt. If you change the filter to be Required, you will still be able to press OK without entering anything, but now the default value of the prompt function will be applied. You will still get prompted, though.

Regards,

MF.

In Parent report i have Search & Select Prompt for Encounter No. I Set it as Non-Required, Single Select. The slicer expression i have is #prompt ('Fin_No','memberuniquename','set([KFSH DRG COST].[FIN Number].[FIN Number].[FIN Number Pool]->[all])','set(','',')')# and i am passing ALL Encounters by default. (Prompt Property do not have Default Value to be set.).

Now this works fine with Parent Report, but when i try to Drill-Through, i have Target report with Slicer Expression set([KFSH DRG COST].[FIN Number].[FIN Number].[FIN Number Pool]->?EncNo?), but when i run the report and do drill through its prompting for Encounter No to be selected. So i assume the default in the slicer expression did not actually passed to drill-through.

I have tried setting expression in target report to [KFSH DRG COST].[FIN Number].[FIN Number].[FIN Number Pool]->?EncNo?.
also tried making it as Required Field but still its not passing the value successfully to Target Report.

If i dont select anything in Search & Select, it should pass all to Drill Through...

Please suggest...