on 2018 May 08 6:50 AM
Hi
Currently using version Lumira Designer 2.1 SP01
I have a scenario as like below,
we are using 2 Radio buttons:
Radio button1: State and City items related data.
Radio button2: Year and Month items data.
and 4 crosstabs with different data sources like DS1, DS2, DS3, and DS4
Suppose I have select in Radion button1: State and Radio button2: Year then how to show below crosstab,
Radion button1: State and Radio button2: Month then how to show below crosstab,
Radion button1: City and Radio button2: Year then how to show below crosstab,
Radion button1: City and Radio button2: Month then how to show below crosstab,
how to change dynamic cross using radio button selections.
Please help on the above scenario.
Thanks,
Chandrasekhar .K
Hi Chandra,
It seems you have already asked a very similar question: https://answers.sap.com/questions/503887/how-to-select-set-of-dimension-using-radio-button.html
You can apply the same solution to this scenario.
Regards,
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mustafa,
Thanks, for your response.
Using : https://answers.sap.com/questions/503887/how-to-select-set-of-dimension-using-radio-button.html this link
I have written below script in Radio button,
if(RADIOBUTTONGROUP_2.getSelectedValue() =='Value1')
{
DS_2.removeDimension("STATE");
DS_2.removeDimension("CITY");
DS_2.removeDimension("Store_name");
DS_2.moveDimensionToRows("YEAR");
DS_2.moveDimensionToRows("QUARTER");
DS_2.moveDimensionToRows("MONTH");
DS_2.moveDimensionToRows(RADIOBUTTONGROUP_2.getSelectedValue());
}
else
{
DS_2.removeDimension("YEAR");
DS_2.removeDimension("QUARTER");
DS_2.removeDimension("MONTH");
DS_2.moveDimensionToRows("STATE");
DS_2.moveDimensionToRows("CITY");
DS_2.moveDimensionToRows("Store_name");
DS_2.moveDimensionToRows(RADIOBUTTONGROUP_2.getSelectedValue());
}
<br>
Above script working perfectly for single Data Source and single crosstab.
Current Scenario Details:
Note:
I have tried below process,
Radio button1:
if(RADIOBUTTONGROUP_1.getSelectedValue() =='CITY')
{
RADIOBUTTONGROUP_2.setSelectedValue("YEAR");
}
else
if(RADIOBUTTONGROUP_1.getSelectedValue() =='STATE')
{
RADIOBUTTONGROUP_2.setSelectedValue("YEAR");
}<br>
Radio Button2:
if((RADIOBUTTONGROUP_1.getSelectedValue() =='CITY') ||(RADIOBUTTONGROUP_2.getSelectedValue() =='YEAR'))
{
CROSSTAB_1.setVisible(false);
CROSSTAB_3.setVisible(true);
CROSSTAB_2.setVisible(false);
CROSSTAB_4.setVisible(false);
}
if((RADIOBUTTONGROUP_1.getSelectedValue() =='CITY') ||(RADIOBUTTONGROUP_2.getSelectedValue() =='MONTH'))
{
CROSSTAB_3.setVisible(false);
CROSSTAB_4.setVisible(true);
CROSSTAB_1.setVisible(false);
CROSSTAB_2.setVisible(false);
}
if((RADIOBUTTONGROUP_1.getSelectedValue() =='STATE') ||(RADIOBUTTONGROUP_2.getSelectedValue() =='YEAR'))
{
CROSSTAB_1.setVisible(true);
CROSSTAB_3.setVisible(false);
CROSSTAB_2.setVisible(false);
CROSSTAB_4.setVisible(false);
}
//if((RADIOBUTTONGROUP_1.getSelectedValue() =='STATE') ||(RADIOBUTTONGROUP_2.getSelectedValue() =='MONTH'))
else
{
CROSSTAB_3.setVisible(false);
CROSSTAB_4.setVisible(false);
CROSSTAB_1.setVisible(false);
CROSSTAB_2.setVisible(true);
}<br>
I am getting the output as like,
Suppose I have selected City and Year, I am getting State & Year related data,
Select City and Month I am getting State & Month related data.
Select State and Year & State and Month, I am not getting any data.
Thanks,
Chandrasekhar.K
Chandra,
It seems to me that all four data sources are assigned to the same query and you only want to display one of the Crosstabs at any given time. If that is the case, there is no need for multiple data sources and Crosstabs. You can simply include only one data source and one Crosstab, then use the Radio Button selections to trigger swapping in and out of the corresponding dimensions.
Regards,
Mustafa.
User | Count |
---|---|
67 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.