Hi,
I have a radio button prompt which will display two values always from the Query.
The query will fetch only two kind of outputs like,
use value Display value
1 Full
3 partial
otherwise
use value Display value
4 Full
2 partial
By default the use values 1 or 2 should be selected in the radio button prompt which means if 1 and 3 are appearing in the prompt then 1 should be a default value of if 2 and 4 appearing then 2 should be a default value.
I have tried to use the Range selection in the Default selection property by giving the Minimum value 0 and Maximum value 3 but it is not working. But if i give the simple selection as 1 or 2 then it is working properly. Please help if it is possible in cognos to select 1 or 2 by default. Please let me know if it is possible using any script?
Can you have two Radio Button Prompt,
one is for, name it as '1&3'
use value Display value
1 Full
3 partial
Other one is for, name it as '4&2'
use value Display value
4 Full
2 partial
Create a string variable:
If ([Use Value] in (1,3))
then ('1&3')
else ('4&2')
Use a conditional block or render variable. Associate the String variable and the prompt object accordingly.
You also have to change the filter expression as per the condition.
Just a guess, not tested..
Let me know how you go with it?
Thanks
Hi PRIT,
Thank u very much for your reply.
I used two prompts and a small code and conditional block and i got the output as i expected. Thank u very much for your idea :)
Glad to know that.
QuoteI used two prompts and a small code and conditional block and i got the output as i expected
Could you please share the code to see what it does?
Thanks
Also...when you can specify more than one value in default selections by separating them with a comma
in your e.g...you would specify defaults as 1,2
Quotewhen you can specify more than one value in default selections by separating them with a comma
in your e.g...you would specify defaults as 1,2
You can specify only one value in default selection.