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

 

how to Show only selected Level and its Children to that selected Level?

Started by Kiran Kandavalli, 05 Jun 2016 09:14:42 PM

Previous topic - Next topic

Kiran Kandavalli

Based on Selection on Cognos tree Prompt multi selection, how to Show only selected Level and its Children to that selected Level?

Kiran Kandavalli


MFGF

Quote from: Kiran Kandavalli on 05 Jun 2016 09:14:42 PM
Based on Selection on Cognos tree Prompt multi selection, how to Show only selected Level and its Children to that selected Level?

Hi,

a Tree Prompt allows you to select members, not levels. If you select a member you can use the children() function to return the child members of that member.

MF.
Meep!

Kiran Kandavalli

Thanks for your response

I believe a member can also be a level. For example

I have Level 1 to Level 7

Level 2 can be a member of Level 1 and it is also consider as a Level.

Basically My requirement is

1) When user select Level 3, in the report we have to show all its children from Level 3 to Level 7

2) to achieve this I have used descendants(set([ABC].[ABC Hierarchy].[ABC Hierarchy]->?Parameter1?),-1,after)


Problem:

1) When user select  Level 3 and the also selected its member (which is level 4).

2) Report output is displayed as below.

      Level 3,

        Level 4 (Which is Level 3 member)

           Level 5 (which is Level 4 Member)
           .
             .
           Level 7 (which is Level 5 Member)

    Along with the above rows, the report is showing the below rows which are repeated. This is because user selected (Level 3 First...and he expanded the tree and he selected its member (which is Level 4) . The ?parameter? is holding both Level 3 and Level 4.


Additional rows Repeated:

           
         Level 4 (Which is Level 3 members)

           Level 5 (which is Level 4 Members)
           .
             .
           Level 7 (which is Level 5 Members)


As per the requirement we need to show only Level 3 to Level 7. No need to show again from Level 4 to Level 7.

Please suggest!

Thanks!
Kiran



MFGF

Quote from: Kiran Kandavalli on 08 Jun 2016 10:58:24 AM
I believe a member can also be a level. For example

I have Level 1 to Level 7

Level 2 can be a member of Level 1 and it is also consider as a Level.

That's categorically not correct. A level is a level - in your hierarchy you have seven of them. Level 2 is below Level 1, but it is not a child, it is simply a different level in the hierarchy.

Each level has one or more members belonging to it. The parent/child relationships in your hierarchy relate to members, not levels. A member on Level 1 will have child members on level 2, but you absolutely cannot say that Level 2 can be a member of Level 1.

Quote from: Kiran Kandavalli on 08 Jun 2016 10:58:24 AM
Basically My requirement is

1) When user select Level 3, in the report we have to show all its children from Level 3 to Level 7

A user isn't selecting a level when using a tree prompt - they are selecting a member. Your Level 3 may contain dozens of them. You're describing showing "all its children" here - as above, parent/child relationships relate to members not levels. When you refer to "children", you're being even more specific here - you're restricting your selection to the members of just the next level that have your selected member as a parent. If you want to look deeper, then you're looking at descendants, rather than children.

Quote from: Kiran Kandavalli on 08 Jun 2016 10:58:24 AM
2) to achieve this I have used descendants(set([ABC].[ABC Hierarchy].[ABC Hierarchy]->?Parameter1?),-1,after)


Problem:

1) When user select  Level 3 and the also selected its member (which is level 4).

That doesn't seem to make sense. In a tree prompt, a user selects members not levels. I assume you mean your user is selecting a member from Level 3?

What do you mean by "also selected its member (which is level 4)"? Do you mean your user selects a member from level 3 and also one of it's child members from level 4? Why would you allow your user to do that? Why not restrict them to selecting a single member?

Quote from: Kiran Kandavalli on 08 Jun 2016 10:58:24 AM
2) Report output is displayed as below.

      Level 3,

        Level 4 (Which is Level 3 member)

           Level 5 (which is Level 4 Member)
           .
             .
           Level 7 (which is Level 5 Member)

This really doesn't seem to make any sense. How can level 4 be level 3 member? A member exists at a level - it either belongs to Level 3 in your hierarchy, or it belongs to Level 4 in your hierarchy. It can't belong to both. Can you explain?

Quote from: Kiran Kandavalli on 08 Jun 2016 10:58:24 AM
    Along with the above rows, the report is showing the below rows which are repeated. This is because user selected (Level 3 First...and he expanded the tree and he selected its member (which is Level 4) . The ?parameter? is holding both Level 3 and Level 4.


Additional rows Repeated:

           
         Level 4 (Which is Level 3 members)

           Level 5 (which is Level 4 Members)
           .
             .
           Level 7 (which is Level 5 Members)


As per the requirement we need to show only Level 3 to Level 7. No need to show again from Level 4 to Level 7.

Please suggest!

Thanks!
Kiran

As I suggested above, it might be as easy as allowing the user to select only one member from the prompt? If this is not the solution, can you explain?

MF.
Meep!

Kiran Kandavalli

In Simple terms.

I have created a tree prompt with multiple levels to allow the user to select the levels (Multi select) that they are interested in. Once they select the level / Levels, I want to pass the selected level and below Levels underneath it into the report.

Please do let me know if I am not clear.

Thanks!
Kiran

Lynn

It bears repeating. Again.

A tree prompt lets the user choose members, not levels. The muppet has explained this quite elegantly. Twice.

Is this a terminology mix up because the members in your hierarchy are actually captioned using the word "Level"?


MFGF

Quote from: Kiran Kandavalli on 08 Jun 2016 11:46:28 AM
In Simple terms.

I have created a tree prompt with multiple levels to allow the user to select the levels (Multi select) that they are interested in. Once they select the level / Levels, I want to pass the selected level and below Levels underneath it into the report.

Please do let me know if I am not clear.

Thanks!
Kiran

The issue here appears to be that you are allowing users to select multiple members from the prompt. If you must do this for some reason, then you need to educate your users not to select a member from a level and also to select one of its descendant members.

MF.
Meep!