1

有人可以给我参考,我可以在哪里了解 BIRT 报告中的 javascript 脚本?

场景是,我有一个下拉列表,其中包含所有汽车公司的名称……除此之外,它还有ALL选项。When " ALL " option is selected it should display all the records of all car brands.

目前,当我选择个别汽车名称时,它工作正常。ALL 选项不起作用。

这是一个代码片段。

if (params["RP_CarCompany_Name"].value == 'ALL') {
    this.queryText = this.queryText.replace('DYNAMIC_CARCOMPANY', "'" + 'BMW' + "'," + "'" + 'AUDI' + "'," + "'" + 'JEEP' + "'," + "'" + 'DATSUN' + "'");
} else {
    this.queryText = this.queryText.replace('DYNAMIC_CARCOMPANY', "'" + params["RP_CarCompany_Name"].value.join("','") + "'");
}

PS:DYNAMIC_CARCOMPANY 是 SQL 查询中的占位符,类似于这样

SELECT * FROM CAR_DB WHERE carcompany IN(DYNAMIC_CARCOMPANY);

提前感谢您的帮助。

4

0 回答 0