on 08-15-2016 6:23 AM
Hi All,
Initial Problem: I am having a Cross tab with few rows and columns ( 1 Dimension and 5 Measures), and Dropdown box, Filtering crosstab based on dropbox value. used the below code for DrillDown navigation. My issue is, when user clicking on Dimension object in the Cross tab, its working fine, but when user clicking on any key figure/measure value its giving all values irrespective of dropdown selection (SetFilter value of dropdown)
Requirement: Giving the ability to drill down few levels (Drill down functionality like drill/navigation in Webi report)
Example Drill down Hierarchy: Country-->State-->City-->Store
Used the following methods to achieve drill down functionality: SetFilter, RemoveDimension, MoveDimensionToRows
Procedure followed:
if (level == "Country " ) {
level = "State";
DS_1.setFilter("0COUNTRY", CROSSTAB_1.getSelectedMember("0COUNTRY"));
DS_1.removeDimension("0COUNTRY");
DS_1.moveDimensionToRows("0STATE");
}
else if (level == "State" ) {
level = "City";
DS_1.setFilter("0STATE", CROSSTAB_1.getSelectedMember("0STATE"));
DS_1.removeDimension("0STATE");
DS_1.moveDimensionToRows("0CITY");
}
Else{ if (level == "City" ) {
level = "Store";
DS_1.setFilter("0CITY ", CROSSTAB_1.getSelectedMember("0CITY "));
DS_1.removeDimension("0CITY ");
DS_1.moveDimensionToRows("0STORE");
}
}
Code Works like this: Initially created a global variable “Level” and its default value is “Country”. By using IF condition I am reassigning/changing the values based on drill down to the variable. And using Setfilter to filter the data source, and RemoveDimension and MoveDimensionRows methods to add the respective dimension to the cross tab.
My main issue here is, When user clicking on the dimension its drilling down to the next level, but when user clicks on the any keyvalues/Measures, its pulling all values from the data source(Set filter not working)
I tried changing all the Use Interactivity options of the cross tab.
Can some suggest the work around to disable mouse click on measures (or any alternative?)
I searched SCN for similar issues/post but dint find any help
https://scn.sap.com/thread/3309990
https://scn.sap.com/thread/3827568
Thanks,
Kumar.
Hi Kumar,
On further testing, I have been able to replicate your issue. The problem is that when you click a measure cell instead of a dimension cell, getSelectedMembers() returns "(ALL_MEMBERS)". Normally, I would expect that if the Crosstab interaction properties are set as Selection Type "Single" and Selectable Area "Rows", the getSelectedMember() method would always return the dimension member, regardless of where in the row is clicked. However, it appears that the functionality has not been designed this way and the dimension member is only returned if you explicitly click on a dimension cell. This is not intuitive to me but is appears that this is how the functionality has been implemented.
I remember seeing another post on the SCN with the same issue, where the request was to try to disable clicking on a measure cell to prevent this problem but haven't been able to find it.
I'm not sure that there is a good workaround because as you've already discovered, there doesn't appear to be an interaction property combination that provides the desired result of returning a dimension member when any cell in the row is clicked. Perhaps others in the community may have ideas.
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 responding.
Solving the issue by adding an extra panel on top of CrossTab.
Panel Size = Same size as measures of the crosstab.
I know this not the ideal solution, but didt find any better option. May be some one from SCN may some more ideas.
-----------
I am using multiple Drop downs to filter data before bringing it into the application because of the huge volume of the data.
My issue is, when user click on reset button, the application need to reload or refresh(Clear all filters).
I am using ClearAllFilters to clear the filters, and RemoveSelection function, but the crosstab not going back to initial stage.
Ex: When user left the CrossTab at State Drilldown/navigation, and clicked the Reset button, its clearing all filters but the cross tab remains in the same state.
Reset Button Code:
DS_1.ClearAllFilters();
CROSSTAB_1.removeSelection();
Is there a way to reset the crosstab?
thanks,
Kumar.
Hi Kumar,
Since your last question is a new issue, I suggest that you post it as a separate question, as per the SCN Rules of Engagement.
Regards,
Mustafa.
Hi Kumar,
A couple of questions and comments:
1) Why do you have a separate dropdown box for Country instead of performing the Country drill from the Crosstab as well?
2) Try including an APPLICATION.alert() message in your code to check the value returned by getSelectedMember() to confirm why all values are being returned;
3) What version of Design Studio are you running?
Regards,
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.