on 05-29-2013 6:55 PM
I have two dropdown boxes and is cascaded. How do I add "All" in the dropdown box to get back to my initial view.
Hi Sini,
This can be done by manually adding ALL in the following way,
<SelectorComponent>.setItems(<datasource>.getMemberList("<measure>", MemberPresentation.EXTERNAL_KEY, MemberDisplay.TEXT, 50,"All"));
this should give you a false data which is not present in the Dataset, which makes the Datasource to display all!
Hope this helps,
Thanks and regards,
Fazith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi, does this still work in DS 1.2? doing setSelectedValue()=="" doesn't select the "ALL" values.
Jp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do the following
a) In application's "On Startup" event add,
DROPDOWN_1.setItems(DS_1.getMemberList("0D_NW_CNTRY", MemberPresentation.EXTERNAL_KEY, MemberDisplay.TEXT, 10, "ALL"));
Notice the last optional parameter "ALL" (you can have any text eg: "All Countries") added to the dropdown setitems to represent all items of the diemnsion.
b) In Dropdown's "On Select" event add,
if
(DROPDOWN_1.getSelectedValue() == "") {
DS_1.clearFilter("0D_NW_CNTRY");
}
else {
DS_1.setFilter("0D_NW_CNTRY", DROPDOWN_1.getSelectedValue());
}
When ALL is selected, (getselectedvalue is internally null/blank), clear the filter. When any other value is selected, set the filter to this value.
And if you are looking for a drill-down feel, add this instead of the above
if
(DROPDOWN_1.getSelectedValue() == "") {
DS_1.clearFilter("0D_NW_CNTRY");
DS_1.moveDimensionBefore("0D_NW_CNTRY", "0D_NW_PROD__0D_NW_PRDCT");
}
else {
DS_1.setFilter("0D_NW_CNTRY", DROPDOWN_1.getSelectedValue());
DS_1.removeDimension("0D_NW_CNTRY");
}
Here Country is the first column and Product Category is the next column of the crosstab. Initially, both country and product category are shown. When a country is selected from the dropdown, country column is removed giving a drilldown/filter-by feel. When ALL is selected, country column is brought back.
Let me know if it works.
(Not sure about your two dropdown requirements)
Thanks,
Murali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.