【发布时间】:2016-06-28 14:15:00
【问题描述】:
我必须将字符作为多个值传递(例如:'Products'、'Terms'、'Parts'、....),而不是 id。
在浏览了几篇关于在单个参数上传递多个值的帖子后,我在 BIRT 数据集中将我的 sql 写为
select m.country,tp.categoryLev1 ,tp.categoryLev2,m.sentiment,
(case when m.sentiment=1 then 'S1' when m.sentiment=2 then 'S2'
when m.sentiment=3 then 'S3' when m.sentiment=4 then 'S4' end) as rating
from mentionmysql.topic tp
join mentionmysql.master m on m._id=tp._id
where m.Country like ? and tp.categoryLev1 IN ('xxx')
and m.MentionCreatedDate
between str_to_date(?,'%d/%m/%Y') and str_to_date(?,'%d/%m/%Y');
并在打开之前为与 , 相同的数据集编写脚本,
this.queryText = this.queryText.replace("xxx",params["CategoryLev1"].value.join(","));
但我没有得到任何积极的结果。
仅供参考,我使用 spagobi studio(Eclipse 平台版本:Luna SR2 (4.4.2))来创建 BIRT 报告。
我的参数名称是 CategoryLev1。所有参数都定义为文本框,以便我可以将这些参数配置为 spagobi 服务器上的列表框。
谁能帮帮我。谢谢
【问题讨论】: