If you are unable to create a new account, please email support@bspsoftware.com

 

Keep a Tree Prompt Open to Your Current Selection After the Report Execution

Started by Anantula, 22 Oct 2012 05:00:15 PM

Previous topic - Next topic

Anantula

Hi All,

Every time I drill down, select a value and run the report, the tree prompt folds back up to the top and I have to start all over again. Is there any way to keep a tree prompt open to your current selection after the report executes? (Java script?)

We are using Cognos 8.4 and cube based reports. Can some one help us?

Thank you very much.

Anantula

Hi All,

I have been playing around with Java script, had a little success but not achieving what I want. When I keep below script, the Tree Prompt is keep open, but unable to select any value from tree prompt from 2nd time onwards. Can some one suggest any ideas?

Prompt name: Time

Script:

<SCRIPT LANGUAGE=javascript>

var nodes = window.treeTime.getRootNode().getChildren();
var opt= window.treeTime.getRootNode().getChildren().length;
for (i=0; i < opt; i++)
{
                if ((nodes.hasSelectedChildren() == true) && (nodes.isOpen() == false)) {
                 nodes.setOpen(true); 
                 nodes.fetchChildren(true);
}
}
</script>

Thank you.