【问题标题】:Dynamically Passing Parameters to iReport 4.0.1向 iReport 4.0.1 动态传递参数
【发布时间】: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


    【解决方案1】:

    通常我们使用“”来设置字符串类型参数的默认值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-06
      • 1970-01-01
      相关资源
      最近更新 更多