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

check box in prompt page

Started by chinnucognos, 16 Dec 2013 07:31:25 AM

Previous topic - Next topic

chinnucognos

Hi all,
i have a requirement that two calculations(data items) need to display in prompt page.
I have used value prompt with static choices as two data items with conditional varibles taken.
For eg: 1.error rate%
             2.Success rate %
              3.Both.
static choices as error rate% and success rate % in value prompt.
Now the issue is user wants to display above two in check, i hav changed this in 'check box' with multi select 'yes',
but still after running it is displaying in radio buttons
Deal with it!

Lynn

How are you applying the parameter? If you have, for example, a filter that says [DataItem] = ?MyParam? then the prompt will always be treated as a single rather than multi select. The filter would need to be changed to use "in" instead of "=" in order for the corresponding prompt control to render as a multi select prompt.

chinnucognos

i Have used sting variable with case statement as

case when (ParamDisplayValue('Graph1') = 'Error Rate {%}')
then 'Error Rate {%}'
when (ParamDisplayValue('Graph1') = 'success  Rate {%}')
then 'success Rate {%}'
else 'Both'
end
Deal with it!

Lynn

Well then, there's your problem!

Perhaps using "contains" rather than "=" will solve it.

chinnucognos

tried it....still same problem persists :'(
Deal with it!

Lynn

Sounds like you are referencing the parameter elsewhere in a single select sort of way. Try doing a search for expression text and maybe you'll find another reference to it. Attached is a report from the Cognos samples that uses a string variable with "contains" and renders a multi-select check box.

Also, I don't think your case logic (even with contains) is going to work as you expect. First of all, it doesn't really make sense to offer a static choice of "both" when you convert to a multi-select. What if the user selects error rate %, success rate %, AND the both option? It is just confusing for the user and it complicates your logic.

My sample uses logic below:

case
when ParamDisplayValue('SelectMetric') contains 'Quantity'
  and ParamDisplayValue('SelectMetric') contains 'Revenue'
then 'Both'
when ParamDisplayValue('SelectMetric') contains 'Quantity'
then 'Quantity'
when ParamDisplayValue('SelectMetric') contains 'Revenue'
then 'Revenue'
end