步骤1
我创建了一个具有参数查询的数据集
select city from country where country=$P{par_country}
我已经添加了属性,并且在 preivew 上它工作正常。
第2步
现在我用查询创建了一个 LOV(值列表)
select cust_country from country
在测试中它给了我所有的国家
第 3 步
将 LOV 添加到 AD(分析驱动程序)
第4步
编辑驾驶舱时,您必须在“过滤器编辑器”(漏斗图标)中设置参数。它显示了一个包含数据集参数的列表,您可以设置默认值等。
这就是理论......但我的参数列表是空的,所以我不能对数据集参数做任何事情......
在花了几天时间之后,这终于对我有用了
我已通过以下链接https://www.spagoworld.org/jforum/posts/list/4272.page进行了更改,并进行了一些其他更改。
在以下文件中:
1.SpagoBICockpitEngine/WebContent/js/src/ext4/sbi/cockpit/MainPanel.js
在第一行函数 onShowFilterEditorWizard *
config.stores = Sbi.storeManager.getStoreIds();
Sbi.trace("[MainPanel.onShowAssociationEditorWizard]: config.stores is equal to [" + Sbi.toSource(config.stores) + "]");
并取消注释 onShowFontEditorWizard 方法中的相同行。
2.SpagoBICockpitEngine/js/src/ext4/sbi/widgets/grid/InMemoryPagingGridPanel.js
函数 loadStore 中的第 96 行,注释行如下:
//this.store.loadPage(1);
询问:select country,cnt from country_duns PLACEHOLDER_COUNTRY
并在编辑脚本中
country = parameters.get('par_country');
if (country == null) {
placeholder = " ";
}
else {
placeholder = "where country = '" + country + "'";
}
query = query.replace("PLACEHOLDER_COUNTRY", placeholder);
参数为字符串类型的par_country