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

MDX Tree Prompt Value in List

Started by S2000, 04 Oct 2010 03:53:04 AM

Previous topic - Next topic

S2000

Hi,

I have a basic tree prompt on a simple 3 level geographic structure dim.
I would like to display the value the user selected on the report somewhere, with the full tree.

If I use paramdisplayvlaue only the selected item is shown.
If I use paramvalue I can see the full path, but as Bkeys rather than caption.

I'm wondering if I could use some other function to show the ancestors or path in a data item, but I can't find a function that works.

Also, I'm having trouble using the prompt value to return just a single element of a hierarchy to test the functions on.
I thought I could use something like " Geo_Structure -> ?Prompt? " but this doesn't seem to work.

Any help would be most appreciated, even if you can just point me in the direction of some good documentation.

Many Thanks.

Sreeni P

Quote from: S2000 on 04 Oct 2010 03:53:04 AM
Hi,

I have a basic tree prompt on a simple 3 level geographic structure dim.
I would like to display the value the user selected on the report somewhere, with the full tree.

If I use paramdisplayvlaue only the selected item is shown.
If I use paramvalue I can see the full path, but as Bkeys rather than caption.

I'm wondering if I could use some other function to show the ancestors or path in a data item, but I can't find a function that works.

Also, I'm having trouble using the prompt value to return just a single element of a hierarchy to test the functions on.
I thought I could use something like " Geo_Structure -> ?Prompt? " but this doesn't seem to work.

Any help would be most appreciated, even if you can just point me in the direction of some good documentation.

Many Thanks.


can u just let me know what exactly ur requirement is....?

u can use if it fixes your problem

roleValue('_levelNumber',([hierarchy used in tree prompt]->?parameter of tree prompt?))




S2000

Specifically,
Imagine the user has selected from the tree prompt 'Europe' 'UK' 'Slough'..
I would like to be able to show on the report a single data item that says Europe, UK, Slough.

And if the user selected 'Europe' 'France'.
I would like the same data item to show Europe, France.

I believe there are ways I could do this using a single line list with one column for each of the levels, and some sort of suppression on any levels below the item selected to keep it as one row, but I'm wondering if there's a simpler way.

Something akin to paramvalue(?prompt?), but which shows the captions rather than the bkeys.

Thanks again.

Sreeni P

Quote from: S2000 on 04 Oct 2010 05:08:29 AM
Specifically,
Imagine the user has selected from the tree prompt 'Europe' 'UK' 'Slough'..
I would like to be able to show on the report a single data item that says Europe, UK, Slough.

And if the user selected 'Europe' 'France'.
I would like the same data item to show Europe, France.

I believe there are ways I could do this using a single line list with one column for each of the levels, and some sort of suppression on any levels below the item selected to keep it as one row, but I'm wondering if there's a simpler way.

Something akin to paramvalue(?prompt?), but which shows the captions rather than the bkeys.

Thanks again.



paramValue which holds the object name not a value, In parmDisplayValue it holds that Particular value of that selected object.

If you want to display the total path of the entries which u have been selected from the Tree prompt, then it is work around process.

will update u on this soon

rockytopmark

S2000 - Unless I am mistaken, you are looking for a Breadcrumb trail.  If so...

Create a data item(s) incorporating the Ancestor() function, for each possible level in the hierarchy.  It takes some creativity, but it isn't that hard.

For you example, where "Slough" was selected in the Tree Prompt:

caption(ancestor([your_member],2)) + ' > ' + caption(ancestor([your_member],1)) + ' > ' + caption([your_member])

The creativity comes in when the selection on the tree prompt is at the top level or 2nd level.... this expression will return null, since the ancestor(... ,2) value will return NULL.  You can break it down into separate pieces for each level, piece it together later perhaps.  I have spent a little time trying to perfect this, and I am not there yet, but I think you should get the gist of what I am showing here.

Good Luck... M