Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Design Studio
Viewing all articles
Browse latest Browse all 4041

Select dimention in dynamically canged datasource

$
0
0

Hi,

 

My task – is dynamically represent data in Chart from several Data Sources by selecting Radio buttons.

 

Let’s consider the case then in BW I have two BEx-queries. Each query contains a structure of Key Figures in Rows. I created two OLAP-connections in BO (Design Studio is in SAP BO BI Platform mode).

 

I added DS_1 with Load in script = true by default it uses OLAP-connection_1.

 

In my Application I initialized DS_1 on startup:

DS_1.assignDataSource(“Connection GUID”, dataSourceType.Query, “BEx-query tech.name”);

DS_1.setFilter("Dimention_ID", value); - to select and show only one Key Figure from the BEx Structure in the chart.

http://i.imgur.com/wh0BLfQ.png

 

In Chart properties in Data Binding  area, Data Source is DS_1 and Data Selection is empty.

http://i.imgur.com/faBEBWu.png

By clicking on the Radio buttons I want to change Data Source in my Chart. Here is my script:


if (RADIOBUTTONGROUP_1.getSelectedValue()=='Quarter') {
DS_1.assignDataSource("cuid:AZm4X1eh4vFGty6kkosCzQA", DataSourceType.QUERY, "ZHRP001_R0013",false);
DS_1.loadDataSource();
DS_1.setFilter("6JW7K7JQYJR263T2KXX1N8AA5", "6JW7K7JQYJR263T2KXX1NA7T9");
//CHART_1.setDataSelection("6JW7K7JQYJR263T2KXX1NA7T9"); // it doesn't work
}
else if (RADIOBUTTONGROUP_1.getSelectedValue()=='Month') {
CHART_1.setVisible(true);
DS_1.assignDataSource("cuid:AcCOCk2NWTZMkEuxtvlGgGI", DataSourceType.QUERY, "ZHRP001_R0012",false);
DS_1.loadDataSource();
DS_1.setFilter("6JW7K7JQYJR263RFB04X3XSXY", "6JW7K7JQYJR263RFB04X3ZWSM");
}
else
{
}

Look at screeshot.

2-nd row i assign another OLAP-connection and BEx-query

http://i.imgur.com/9N4VG84.png

In spite of the error this script works fine!


http://i.imgur.com/MXn4o4w.png

http://i.imgur.com/F7MKMiB.png

Without 5-th string from the script it reterns all Key Figures from the BEx query Structure.

http://i.imgur.com/uZQzW5n.png

 

 

I have doubts about my script.

Is there another approach to restrict dimention in dynamically changed Datasource?




Viewing all articles
Browse latest Browse all 4041

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>