日期:2014-05-18  浏览次数:20707 次

report builder 3.0 中 参数 选中 改变事件


这个是在 report builder 报表中的 3个参数。

当选中 改变 ERP TYpe 的值的时候

我的 EQP ID 的值也 要改变

SQL code


if OBJECT_ID('SelectResourceNameByModel') is not null
drop proc SelectResourceNameByModel
go
create proc SelectResourceNameByModel
@EqpType nvarchar(128)
as
begin

      if @EqpType=''
      begin
      select ttr.ResourceId,ttr.Name from CoreDataModel.T_Resource ttr where 1=1 order by ttr.Name
      end
           
      if  @EqpType<>''
       begin
      select ttr.ResourceId,ttr.Name from CoreDataModel.T_Resource ttr where 1=1 and model='d10' order by ttr.Name
      end
end

GO





现在的问题是,我调用 存储过程的时候,他会调用 报表中 参数。

报错内容如下:

 报表参数“EqpID”的 DefaultValue 或 ValidValue 依赖于报表参数“EqpType”。前向依赖关系无效。
----------------------------
报表“主报表”的定义无效。
----------------------------
本地报表处理期间出错。


在报表中 ,本身是参数。。是否 能采用 selectchange 事件

------解决方案--------------------
刚开始预览EqpType的值是什么, EQP ID 应该是disabled ,注意EQP ID的DefaultValue