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.
In Chart properties in Data Binding area, Data Source is DS_1 and Data Selection is empty.
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
In spite of the error this script works fine!
Without 5-th string from the script it reterns all Key Figures from the BEx query Structure.
I have doubts about my script.
Is there another approach to restrict dimention in dynamically changed Datasource?





