Skip to Content
author's profile photo Former Member
Former Member

clear selection on chart

SAP BusinessObjects Design Studio

Release 1.6 SP1 Patch 2 (Version: 16.1.2)

Source: Relational database, thru UNX

In my application I have 1 chart, 1 scorecard and 1 KPI to report

1. KPI = "# of Key Products"

2. chart: treemap of products (sales and # customers as two metrics by product required to plot treemap)

3. scorecard - product scorecard with each row representing one product

2 filtering actions:

click on multiple products (one by one) in treemap and then filter the scorecard on each selection.

also user can click on KPI ("# of Key Products") and the scorecard will clear all exisitng filters and shows all key products.

Issue:

when i make a selection of products on treemap (1 or more), my scorecard filters accoridngly. Now when I try to click on KPI, I'm able to clear all filters on scorecard query and apply new filter to show only Key Products. however the previously selected products on treemap as still showing up as selected. I wanted to clear all the selections on the treemap when ever user clicks on KPI and thus tried using the below code:

chart.clearSelection();

DS_Scorecard.clearAllFilters();

DS_Scorecard.setFilterExt(product, vKPIProducts);

When I test this using the below steps:

1. run the application

2. select a product on treemap (the scorecard shows only that product)

3. clicked the KPI number, then the treemap clears the selection done; the scorecard gets filtered to show the key products but almost immediately the scorecard again refreshes and shows all products. This last unwanted step i guess is caused by "clearSelection()" call but if I do not use it then I cannot clear selection on the treemap.

I checked below links and some more in SCN but couldnt slove my issue.

http://scn.sap.com/thread/3473811

http://scn.sap.com/thread/3807014

application.PNG (6.7 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 25, 2016 at 05:19 AM

    Hi Srikanth,

    I suspect the issue is caused by the fact that the "On Select" event of the chart is triggered again when you execute the chart.clearSelection() method, so a filter on "ALL MEMBERS" is applied. I would need to see your script code for the "On Select" event to be clearer though.

    One approach you could try is the following:

    1) Create a global script variable called KPI_Clicked of type boolean with a default value of "false";

    2) In the "On Click" event of the KPI, set the KPI_Clicked variable to "true";

    3) In the "On Select" event of the chart, wrap the data source filter code in an if then statement such as the following:

    if (KPI_Clicked) {

    KPI_Clicked = false;

    } else {

    // Execute filtering code

    }

    Regards,

    Mustafa.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.