【发布时间】:2014-05-05 08:03:38
【问题描述】:
我正在开发 iReport 4.0.1 版。我的查询是
select productcategory as CATEGORYNAME,
value as VALUE,m_product_id::text,
product as NAME,count(pricexception) as stock
from dtawm_stockcalculation_v
where m_product_id=$P{M_Product_ID} or $P{M_Product_ID} is null
and productcategory=$P{M_Product_Category_ID}
or $P{M_Product_Category_ID} is null
group by value,m_product_id,product,productcategory
其中我使用了两个参数:$P{M_Product_ID} 和 $P{M_Product_Category_ID}。在这里,我将两个参数的默认值设置为 '%',但出现错误:
Cannot cast char to string.
【问题讨论】:
标签: sql jasper-reports