kinber 发表于 2016-12-8 14:36:35

传递参数,多值

传递参数,RecId 为int类型,现在传递一个参数RecIdList,值为1,2,3 。RecIdList为string类型,但是提示转换为int错误,什么情况?


Lenka.Guo 发表于 2016-12-8 15:09:45

您好:
理解您的意思是:
1. 报表参数 RecID 为Int 类型
2. 为报表参数 RecID, 传的值是 RecIDList (string). 提示错误。

首先报表参数 RecID 应设置为多值。第二 在后台传递RecIDList ,需要走个循环为RecID赋值,
for(int i=0;i<RecIDList.Length;i++)pagereport.Report.ReportParameters.DefaultValue.Values.Add(RecIDList);
页: [1]
查看完整版本: 传递参数,多值