如何添加“全选"在CDE中选择组件的选项? [英] How to add a "select all" option to select component in CDE?
问题描述
我的仪表板上有一个选择组件,我想添加一个全选"选项作为此选择器的默认值.该选择组件的数据源是SQL. 有人可以帮忙吗?
I have a select component on my dashboard and i want to add a "select all" option to be a default value of this selector. The data source for this select component is SQL. Can anyone help?
推荐答案
要添加全选,将其作为默认值,我将举例说明.
To add select all option as a default value i will explain you with an example.
考虑到我在一列中有两个不同的行(例如:Category是列名,并且该列中有两行"Billable","Non-Billable")选择这两者中的任何一个是可能的,或者使用multiselect来选择两者也可以完成.假设我要在类别"列的第三行中添加所有类别",并使用它来选择两者.下面是过程和屏幕截图.
consider i have two distinct rows in one column(eg: Category is the column name and there are two rows in that column "Billable","Non-Billable") selecting either of this two is possible or selecting both using multiselect can also be done.suppose if i want to add "All Category" as third row in Category column and use that to select both.below is the procedure and screen shot.
在组件"面板中:
在常规"下选择自定义参数 名称:Param1 javascript代码:所有类别" 保留默认值
under Generic select custom Parameter Name : Param1 javascript code : "All Category" rest default values
在选择"下,选择"selectmultiComponent"
under Selects select selectmulti Component
名称:select1 参数:Param1 侦听器:Param1 数据源:Billability_query1(用于选择组件的sql查询所在的位置) HTMLObject:占位符以显示选择的组件. 保留所有默认值
Name: select1 Parameter: Param1 Listeners: Param1 Datasource: Billability_query1(location where sql query to select component is wriiten) Htmlobject: place holder to display select component. rest all default values
数据源面板:
在sql查询下选择sqlover sql jdbc
under Sql queries select sqlover sql jdbc
查询:
从pentaho_output_report中选择所有类别"作为类别 联盟 从pentaho_output_report选择类别;
Select 'All Category' as Category from pentaho_output_report UNION Select Category from pentaho_output_report;
参数:Param1
希望这会有所帮助.
这篇关于如何添加“全选"在CDE中选择组件的选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!