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 Do I Use Value Prompt As A Radio Button Group !

Started by mohsin2010, 04 Jan 2011 03:56:13 AM

Previous topic - Next topic

mohsin2010

HI ,
      i am using value prompt as a radio button group such that i want to filter the data according to our need using radio button group and there is a text box prompt as well.
    such that i have two radio button for region and country and select any one and after that i put region name or country name according to our radio button selection and filter the data .. . how can i do this :-[

Best Regards!

venkiatmaruthi

Put two value prompts and make SelectUI as Radio button group.

Then use Render variable and capture the Text box value to this and do the formatting accrodingly.


Thanks.

mohsin2010

do you please tell me step wise for getting my goal  i am not getting it i am unable to render the variable??

MFGF

I'm not quite clear on what you're tyring to do here.  What are you using the radio buttons for?  Are you trying to set up a radio button prompt that will allow you to choose whether to filter on Region or on Country?

MF.
Meep!

venkiatmaruthi

Ok.. it's bit triky as we have to use Javascript. I was thinking like it's on Main page.

Here we go__

1) Create one value prompt name it as 'choice'. The parameter for this is P_choice
2) create two radiobutton group value prompts. the parameters P_Region, P_Country
3) create boolean render variable for Region and Country prompts seperately.
   for Region.... render variable say V_Region
    script would be___
    ParamDisplayValue('P_choice')='Region'
   similar for Country
      ParamDisplayValue('P_choice')='Country'
4) create an HTML item just beside to Choice prompt
    give the script as
      <Script>
         function my_onchange()
          {
            SetPromptControl('reprompt')
           }

         document.forms["formWarpRequest"].elements["_oLstChoiceschoice"].onchange = my_onchange
      </Script>



Now run the report. It should work.

Hope this helps.

Thanks.

mohsin2010

Thanks venkiatmaruthi,

i did as you posted but there is some error going over there what is the result when i run report i want to show you in this attachment.

mohsin2010

HI MFGF ,

   ok i tell you what i want actually i want a Value Prompt of Radio Button Group having two radio button one for region and the other one  for country and there is a Text Box Prompt next to it where we can enter either
"Region name" or "Country name" according to our radio button selection and filter data accordingly.

venkiatmaruthi

Sorry

I can't open rar as my company policy is not allowing rar files.


Thanks.

S2000

If I read that correctly all you really need to do is make the text box prompts optional.
Then the reports will only filter on the item that has been entered and ignore the blank prompt.

You don't need a radio button prompt to declare which of the two prompts is the active one.

rKn

Hi MF.

Please let me know whether you got solution for your query..if so please help me tooo...i m also tryin to find out a solution similiar to to your query..

thx
Renjith