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

Reset the Defaults for Tree Prompts

Started by srinu_anu2007, 30 Apr 2014 08:05:12 AM

Previous topic - Next topic

srinu_anu2007

Hi,

I want to reset the defaults in tree prompts which is selected by the property as "Multiselect'=Yes. Can anybody help me to reset the defaults in my tree prompt? i am using 10.2 Report studio

Can any one provide me the Javascript.


Thanks,
Venkat

srinu_anu2007

Hello,

Can anyone help me to reset the defaults in tree prompts?

srinu_anu2007

Hi,

I have "Region" value prompt which is having 2 radio buttons and when you click on radio button1 it was showing tree prompt which is the check box(this is having default selections of my check box) and when you click on radio button2 it was showing tree prompt2(there is no defaults in this check box). So i want to reset my first treeprompt checkbox? can any one help me to get the js.

srinu_anu2007

Hello Experts,

Can any one help on this requiement?

I am able to reset my value prompts defaults but the issue with my radio buttons.Please find the js which is resetting my value prompts and the same way i have to reset my radio button prompts

srinu_anu2007

Nobody is having experience to reset the defaluts for tree prompts?

srinu_anu2007

Hi Nimrod,

if you have some free time can you help me? i have posted my code to clear the defaults except tree prompts.

Thanks,

MDXpressor

#6
Srinu,
You have a lot of questions regarding .js and prompt buttons.  Are you sure that you really need all this .js?

I think the fact that you are having such a hard time getting responses is due to the fact that there just aren't a lot of people who are experts at both Cognos AND .js.  By insisting on solving your problems with .js you are incurring a lot of risk for your business.  You may finally tweak it to the point it works, and can roll out to production.  Then you get a better offer from a different company (or get hit by a bus) and leave behind a mess that the business is unable to overcome easily.  Not only do they need to find an expert in Cognos to assess any downstream issues, but that expert also needs to know .js.  There is an extremely low number of people in that resource pool.  And they all charge top rates.

That concludes my lecture...

As for your question itself, I think you are saying that the tree prompt is coming up as a multiselect (with check boxes in the tree prompt).  This indicates to me that you are using the tree prompt to populate a SET() rather to isolate a single member.  Is this right?
No, a proof is a proof. What kind of a proof? It's a proof. A proof is a proof, and when you have a good proof, it's because it's proven.

-Jean Chretien

srinu_anu2007

Hi MDXpressor,

Thanks for your suggestion. I am also thinking to go out of this because stupid things we are working, these reports are very fery complex(60% JS and 40 cognos). Its not easy to change the company here,As a permanent employee we can't get offer easily because here 3months notice period we have to serve so nobody will wait for you.

As per customer requirement, we are taking the value prompt which is the property(radio button group) and it is required to yes and auto submit to yes and we are not assigning to any query, we are using MUN's(ex:a,b) in static choices and default selection property is:a(this is mun)

we are taking tree prompt which is assigned to query and use value expression we are using: #prompt ('Param_Function','memberuniquename','[packagename].[dimension name].[hierarchy name]->:[TM].[dimension name].[hierarchy name].[@MEMBER].[N00000]')#
and properties are required and mulitselect set to: Yes and default selection property set to same as above mun of 'a' so default selction is same for value and tree prompts. so when you run the report it has by defalt is mun of 'a' and for that i have to reset the defaults.

I hope you can understand.
Thanks,

MDXpressor

I'm struggling a little with the language barrier srinu.  But, let me take a crack at it...

You have a radio button prompt which is loaded with static choices.  Those choices are MUNs, and you have one of them ('a') set as the default value.  So, your value prompt is not populated by a query, is a single select.  I'm assuming you want to isolate a member, to use a 'point of perspective'.  A single point in the cube to base your relative member selections from, (ancestors, siblings, cousins, children).

You have a 2nd prompt on the page which is a tree prompt, and it's meant to be a multiselect, I think.  What I'm not understanding is the point of this prompt.  Is it meant to allow users to build a set choices on their own?  What does this prompt do in the report?

Even though I don't know your plan, I think you're struggling with the notion of building a multimember set from a tree prompt.  I see you are using macro language to accomplish this, the piece you're missing is the set() function. 

set( 
    #prompt ('Param_Function','memberuniquename','[packagename].[dimension name].[hierarchy name]->:[TM].[dimension name].[hierarchy name].[@MEMBER].[N00000]')# 
)


Further, I notice you are using macro language, which is fine in and of itself, but it's not terribly elegant, especially if you're going to assign a default value to the prompt anyhow. 

NOTE:  The following code causes your prompt to become required.  Only the macro above with the 'default value' parameter completed will avoid a required prompt when including a prompt in a data item of a query.

[packagename].[dimension name].[hierarchy name]->?Param_Function?

Putting it all together and coming up with a multiselect Tree Prompt (on the report page, no prompt page required) which builds a set for the query to use:
1)make sure your tree prompt has the default MUN you want to use set in it's default value property
2)create a data item which will be the set
3)enter the set syntax into the data item
       set(
               [packagename].[dimension name].[hierarchy name]->?Param_Function?
       )

No, a proof is a proof. What kind of a proof? It's a proof. A proof is a proof, and when you have a good proof, it's because it's proven.

-Jean Chretien