Skip to Content

Tree component and personalization

Hi all :)

I am struggling with the tree component and personalization. I have a simple report on finance data (actuals vs budget) with dimensions like companycode , glaccount and profitcenters. The tree component is used to make the user able to browse and select prifitcenters from the hierarchy. This works fine. And also setting personalization works fine.

But if personalization is set and the user changes the companycode the tree component goes blank and shows no data. All the other components are updated accordingly.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    May 15, 2017 at 12:14 PM

    I have made an even simpler applicaition to isolate my issue:

    It consists of 2 datasources using the same Bex Query.

    DS_1 displays a crosstab with data, and DS_2 displays the corresponding pctr-hierarch so that the user can make selections from the tree component and get the correct result displayed in the crosstab.

    I also have a dropdown showing the relevant companycodes for this case.

    Code for the dropdown (on select):

    DS_1.clearFilter("ZPROF_CTR");
    DS_2.clearFilter("ZPROF_CTR");
    DS_1.clearFilter("0COMP_CODE");
    DS_2.clearFilter("0COMP_CODE");
    
    
    APPLICATION.setVariableValueExt("V7C_USM_COMPCODE", DROPDOWN_1.getSelectedValue());
    

    Code for the tree component:

    DS_1.clearFilter("ZPROF_CTR");
    APPLICATION.setVariableValueExt("V7C_USM_COMPCODE", DROPDOWN_1.getSelectedValue());
    DS_1.setFilter("ZPROF_CTR", TREE_1.getSelectedMembers());
    

    This works perfect before I set personalization. I can browse and select profittcenters and I can change companycode and the tree-structure changes to the relevant part of the hierarchy.

    Then if I click on "set personalization" with a selection made in the tree-component this also works when I reopen the report, but if I navigate away from the personalized pctr in the three component nothing changes. It seems like the tree component stays "unrefreshed", the crosstab changes like I would expect.

    Anyone have a solution to this issue?

    BR
    Trond Erik

    Add comment
    10|10000 characters needed characters exceeded

    • This is the sample report opened with personalization active. If I now select another profitcenter from the tree model this is not reflecetd in the crosstable.(this is working perfect without personalization set). And also changing CC in the drop down has no effect on the tree model now.

      It seems that the tree model is not refreshed correctly with active personalization.

      BR

      Trond Erik

      with-pers.png (59.9 kB)
  • May 16, 2017 at 02:29 AM

    Hi Trond,

    Thanks for the clarification. Another question. What is the reason for using a BEx Variable to filter Company Code instead of setFilter()? Is it because the BEx Query is configured to default the initial BEx Variable value to the user's company code? Otherwise, for performance reasons, it is generally recommended to use setFilter() in preference to BEx Variables.

    All that being said, let's take this step-by-step and simplify the application further to try to trace the cause of the issue. Please make the following changes to your application:

    1. Update the code for your dropdown so that it reads as follows:

    // DS_1.clearFilter("ZPROF_CTR");
    // DS_2.clearFilter("ZPROF_CTR");
    // DS_1.clearFilter("0COMP_CODE");
    // DS_2.clearFilter("0COMP_CODE");
    
    // APPLICATION.setVariableValueExt("V7C_USM_COMPCODE", DROPDOWN_1.getSelectedValue());
    
    DS_2.setVariableValue("V7C_USM_COMPCODE", me.getSelectedValue());
    

    There is no need to clear filters as each time a new filter value is applied, any existing filters on the same dimensions will be overwritten. Also, since you are simply selecting a single company code for your BEx Variable, there is no need to use setVariableValueExt(), setVariableValue() is preferred. Furthermore, since the intent of the BEx Variable is to restrict the list of available profit centres to a specific company code, there is no need to set the variable at the application level, so you should set it at the data source level, as per the updated code above. As data source DS_1 is filtered by profit centre, it is redundant to also set the company code BEx Variable at the application level since any given profit centre can only belong to one company code anyway.

    2. Update the code for your tree component as follows:

    // DS_1.clearFilter("ZPROF_CTR");
    // APPLICATION.setVariableValueExt("V7C_USM_COMPCODE", DROPDOWN_1.getSelectedValue());
    
    DS_1.setFilter("ZPROF_CTR", TREE_1.getSelectedMembers());

    There is no need to set the value of the BEx Variable again since it has already been set as a result of the dropdown selection.

    3. Set the Bookmark Loading property of your application to "Hide and Keep Prompts".

    Let me know how you go.

    Regards,

    Mustafa.

    Add comment
    10|10000 characters needed characters exceeded

  • May 16, 2017 at 07:55 AM

    Hi Mustafa, and thanks a lot for taking time to guide me! :)

    I was using the BEx Variables because they were there in the original query built for another report. No other reason, I have now updated my query to disregard those.

    My drop down now look like this:

    DS_2.setFilter("0COMP_CODE", me.getSelectedValue());
    DS_1.setFilter("0COMP_CODE", me.getSelectedValue());
    

    (I guess I need to set the new company code in both data sources?)

    The tree component looks like this:

    DS_1.setFilter("ZPROF_CTR", TREE_1.getSelectedMembers());
    

    This is also working as expected, I can freely change company codes and select one or more profit centers and get my data.

    When I then select one profit center and set my personalization and reopen the report my start page is as expected. But if I then select another profit center the cross table updates once and when I select another one nothing happens. If I select another company code the data in the cross table changes, but the tree model don’t (it still shows the hierarchy that “belongs” to the personalization.)

    It’s like the tree model is “disconnected” from the rest of the application when using personalization.

    Best regards

    Trond Erik Bones

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Trond Erik,

      The BIP add-on applies only to Design Studio applications. It does not affect other report types such as Webi or Crystal Reports. If your question relates to already published Design Studio reports, then yes the BIP add-on applies to these. So before upgrading the BIP add-on in your Production environment, you should satisfy yourselves that the already published reports are working as expected after upgrading the BIP add-on in your Dev and QA environments.

      Regards,

      Mustafa.