on 09-12-2013 12:21 PM
Hi All,
.
I have three filters(Plant,material and year). i am getting the data on charts based on filter default values
in plant filter on select i have given code bellow
DS_1.setFilter("Z_PPCD",PLANT.getSelectedValue());
MATERIAL.setItems(DS_1.getMemberList("Z_MATPCD", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 50));
in material filter,
DS_1.setFilter("Z_MATPCD",MATERIAL.getSelectedValue());
YEAR.setItems(DS_1.getMemberList("0CALYEAR", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 50));
in year filter,
DS_1.setFilter("0CALYEAR", YEAR.getSelectedValue());
when i run the report i am getting the all the data from data base
Hi,
To preselect a concrete known value in your dropdowns when your first open the report use the following dropdown's method to preselect an item from the list of dropdown's items:
setSelectedValue(value) -- Selects the item with the specified value.
after that apply the value preselected in the dropdown as a filter on the used datasource.
To apply default filters when you first open a report, make sure to place some scripting also into the:
Application > "On Startup" Event
and not only to the "On Select" events of your dropdowns.
General logic in a cascading filters scenario:
DROPDOWN_1.setItems(...);
DROPDOWN_1.setSelectedValue(...);
DATASOURCE_1.setFilter(...);
DROPDOWN_2.setItems(...);
DROPDOWN_2.setSelectedValue(...);
DATASOURCE_1.setFilter(...);
DROPDOWN_3.setItems(...);
DROPDOWN_3.setSelectedValue(...);
DATASOURCE_1.setFilter(...);
Example for your 3rd dropdown:
YEAR.setItems(DS_1.getMemberList("0CALYEAR", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 50));
YEAR.setSelectedValue("2011");
DS_1.setFilter("0CALYEAR", YEAR.getSelectedValue());
Regards
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramana,
Before I can answer you, I need to ask you something:
You have 3 dropdowns: 1. PLANT, 2. MATERIAL, 3. YEAR
From the code you have in your "on select" events it looks like that only MATERIAL and YEAR dropdowns are filled dynamically by scripting.
Regards
David
Hello,
I have a dropdown and in the startup I have declared as:
DROPDOWN_1.setItems(DS_ALL_MAIN.getMemberList("0CALMONTH", MemberPresentation.TEXT,MemberDisplay.KEY, 13)); ----------------to set the items in dropbox
DROPDOWN_1.setSelectedValue(DS_ALL_MAIN.getVariableValueExt("ZE_CALMON"));----------------to set the default value = default value set in BeX (current month/current year)
Even then I am not able set the default value. It is still appearing as 09/2013 (lease value) instead of 09/2014 as default.
My On Select code for dropdown is:
APPLICATION.setVariableValue("ZE_CALMON", DROPDOWN_1.getSelectedValue()); ---------------to display rolling months
When I run the BeX query in rsrt, default value is currently set.
Please suggest
Thanks & Regards
Swasti
HI David,
I have worked similar way ( as per your previous post, setItems, setSelectedValue, then setFilter ), still my dropdown shows ALL values and doesn't take the selection I am passing.
The selection is reflected in data, in other affected charts.
But the dropdown holds "ALL"value in place of my default selected value
I have not specified "ALL" in the setItems.
Any thoughts on this?
Best Regards,
Rashmi
Hay,,
Can you please share source code of this DASHBOARD..????
Thanks in Advance,
Bharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As Nirupa suggests it is better to use a Dimension filter or FIlter panel(multiple cascading Filters),
Apart from being easy o configure, it also boosts your iniital load time, as retrieving and populating your Dropdown box tends to be slower.
Regards,
Fazith Ali Z
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramana,
Try to use 'Dimension Filter' component instead of combo box as shown in below image and write the script for start up filter values on the whole Application as in second image. By using this component you can pass either single or multiple or even certain range of values. Hope this might help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi RamanaReddy,
currently I had the same issue.
You have to define the initial selection criteria of your Data Sources (views) which you would like to use when starting the Design Studio application.
Please Select your "Analysis Application" -> Properties -> Events -> On Startup
The following example script statement should help:
[Name of your DataSource].setFilter("[Dimension]", "[specific filter value]");
DS_1.setFilter("0PLANT", "KEY_OF_PLANT1");
DS_2.setFilter("0MATERIAL", "KEY_OF_MATERIAL1");
DS_3.setFilter(0CALYEAR"; "2013");
This initial pre-selection guaranteed that not all the data (not all entries each dimension) from data base will be displayed.
Regards,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.