在用皕杰报表做数据查询时,有时需要给一个参数赋多个值,这时要把参数类型设置为数组类型(包括整数组、实数组和字符串组),而在sql语句中要把条件设置为 in (?)。
第一步:新建报表,建立数据集

第二步:建立参数

第三步:设置数据集参数

第四步:设表计样

A3单元格中表达式为:=ds.select(产品ID),设置为纵向扩展;
B3单元格中表达式为:=ds.产品名称;
C3单元格中表达式为:=ds.单位数量;
D3单元格中表达式为:=ds.单价;
E3单元格中表达式为:=ds.库存量;
第五步:预览

第六步:输入参数时用英文逗号间隔,确定。

网友评论