COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sram007 on 24 Feb 2011 04:27:17 AM

Title: static choice All in value prompt
Post by: sram007 on 24 Feb 2011 04:27:17 AM
Hi,
I am having a Gender Prompt which shows Male,Female But the user wants both option such as 'ALL'. It means if i select ALL option both Male & female data should be displayed. So that i have added a text ALL in static choice in Use & Display.& my prompt name is Param1
can u guys help me with the next steps which i have to do...

Thanks in Advance..
Cheers
Dilip
Title: Re: static choice All in value prompt
Post by: PRIT AMRIT on 24 Feb 2011 10:38:54 PM
Modify your filter expression:

?Parameter?='ALL'
or
[Data Item]=?Parameter?

Thanks
Prit
Title: Re: static choice All in value prompt
Post by: jahnavi on 25 Feb 2011 06:47:30 AM
[dataitem]=?param1? or ?param1?='All'
Title: Re: static choice All in value prompt
Post by: melee on 25 Feb 2011 09:30:10 AM
Two options; make the filter and prompt optional so if nothing is chose, they pass both.

Parameter:

Use: F
Display: Female

Use: M
Display: Female

Use: M, F
Display: All

Filter:
[Gender] in #sq(prompt('GenderPrompt','token'))#
Title: Re: static choice All in value prompt
Post by: sram007 on 28 Feb 2011 04:45:08 AM
Thanks fory your reply guys,
But,
Mele-Im getting some error

PRIT, Jahnvi -

[Gender] =?param1? or ?param1?='All'

This code is validating successfully ,
But,When im clicking All in prompt page i can able to see only column headings.No Data.
Please guide me.
Regards
Ram
Title: Re: static choice All in value prompt
Post by: Gopinath on 28 Feb 2011 10:50:10 AM
Check whether the string 'All' in your filter [Gender] =?param1? or ?param1?='All' is exactly identical to your prompt static choice value 'All'