Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services ssrs ReportParameter构造函数字符串数组限制?_Reporting Services_Parameters - Fatal编程技术网

Reporting services ssrs ReportParameter构造函数字符串数组限制?

Reporting services ssrs ReportParameter构造函数字符串数组限制?,reporting-services,parameters,Reporting Services,Parameters,我有一个报告,我一直在发送一个参数,它工作得很好。 已声明报表参数: string[] pclist = new string(){ "A", "B", "C" }; ReportParameter pcode = new ReportParameter( "pcode", pclist, false ); 这为我提供了一个新的报告参数,该参数由3个值的字符串数组初始化。到目前为止还不错 在报告中,“pcode”参数被定义为“String”,使用方式如下: ... and PCode in

我有一个报告,我一直在发送一个参数,它工作得很好。 已声明报表参数:

string[]  pclist = new string(){ "A", "B", "C" };
ReportParameter pcode = new ReportParameter( "pcode", pclist, false );
这为我提供了一个新的报告参数,该参数由3个值的字符串数组初始化。到目前为止还不错

在报告中,“pcode”参数被定义为“String”,使用方式如下:

...
and PCode in ( @pcode )
...
最近,由于参数的值需要根据登录的用户进行更改,我们对此进行了更改,以便参数从方法调用的返回值获取其字符串数组。(该方法从数据库获取值):

FetchParams(“X”)对数据库执行选择并返回值的字符串[]。大多数情况下,它工作正常。但是,有时报告不会运行,只返回错误消息:

The 'pcode' parameter is missing a value
我们确定的是,FetchParams(“X”)有时会返回几十个值。当字符串[]中的值数量过大时,报告将失败并显示该错误消息。显然,可以用于实例化ReportParameter对象的值的数量存在某种上限

起初,我们认为限制可能存在于sql server本身,作为对in子句中可以处理的值数量的限制。然而,错误消息似乎并不支持这一结论

编辑:试错法显示,对于这种特殊情况,33是字符串数组中值数量的上限

有人有过这个问题的经验吗?
传递给ReportParameter ctor的数组中的值数量是否有上限?
有没有办法将上限配置为更大的数字

任何和所有的帮助都将不胜感激。
谢谢

嘿,伙计们,这是这一点神秘的真正答案

报告有一个名为“pcode”的参数。
“pcode”参数有一个数据源,用于创建下拉值列表。

现在,运行报告的代码正在生成pcode参数的值列表。
将值列表传递到报告时,如果有一个值与从其数据源生成的报告的列表不匹配,则会收到令人麻木的ssrs错误消息:

The 'pcode' parameter is missing a value
参数“pcode”缺少一个值

乌格丽。但这对你来说是m美元

对于记录,传递给ReportParameter的字符串数组中的值的数量似乎没有限制。。。错误消息来自SSR,而不是生成ReportParameter对象的代码

希望这可以帮助其他有这个问题的人