gpt4 book ai didi

SRSS 2008 R2 的 C# 报告呈现器 - 缺少参数

转载 作者:行者123 更新时间:2023-11-30 22:20:53 27 4
gpt4 key购买 nike

我正在使用 C# 呈现来自 SRSS 2008 R2 的报告该报告有参数,很长一段时间我都没有问题渲染输出。但是今天它决定不工作了!

这里是错误

ReportServerException:此报告需要报告参数“CustomFieldId”的默认值或用户定义值。要运行或订阅此报告,您必须提供一个参数值。 (rsReportParameterValueNotSet):堆栈:在 Microsoft.Reporting.WebForms.ServerReportSoapProxy.OnSoapException(SoapException e)

代码如下:

ReportViewer rv = new ReportViewer();
rv.ShowCredentialPrompts = true;
rv.ProcessingMode = ProcessingMode.Remote;
rv.ServerReport.ReportServerUrl = new Uri(ReportsClient.ReportServerUrl);
rv.ServerReport.ReportPath = string.Format("/Reports/{0}", item.Name);
rv.ServerReport.SetParameters(thisLoopParams.ToArray());
rv.ServerReport.Timeout = -1;
rv.ServerReport.Refresh();

// render the report
string mimeType = string.Empty;
string extention = string.Empty;
string encoding = string.Empty;
string[] streamIds;
Microsoft.Reporting.WebForms.Warning[] warnings = null;

byte[] result = rv.ServerReport.Render(outputFormat, deviceInfo, out mimeType, out encoding, out extention, out streamIds, out warnings);

如果我检查 thisLoopParams,我可以清楚地看到“CustomFieldId”ReportParameter,它确实有一个值,但错误仍然出现。

有什么想法吗?

最佳答案

找到了。我查看了 ReportParameterInfoCollection paramInfo = rv.ServerReport.GetParameters(); 并发现一些参数“无效”。我知道为什么,但我对“未提供”的原始错误感到有点困惑。我猜这是因为我提供的有效商品我们刚刚打折

谢谢

关于SRSS 2008 R2 的 C# 报告呈现器 - 缺少参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14749348/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com