我在尝试调用 Reporting Services Web 方法时收到 NotImplementedException
我试图从另一个 C# 函数调用 ReportingServices2005.asmx Web 服务中的 GetReportParameters 方法,但收到以下错误:
System.NotImplementedException: The method or operation is not implemented.
我只是从 Microsoft 网站复制了代码:
即以下代码:
bool forRendering = false;
string historyID = null;
ParameterValue[] values = null;
DataSourceCredentials[] credentials = null;
ReportParameter[] parameters = null;
try
{
parameters = rs.GetReportParameters(reportName,historyID, forRendering, values,credentials);
if (parameters != null)
{
foreach (ReportParameter rp in parameters)
{
Console.WriteLine("Name: {0}", rp.Name);
}
}
}
catch (SoapException e)
{
error = e.Detail.InnerXml.ToString();
}
其中 reportName
是包含报告名称的字符串。
有什么想法吗?
提前致谢!
编辑
这是完整的堆栈跟踪:
System.NotImplementedException: The method or operation is not implemented.
at Foo.Foo.ReportingService2005.GetReportParameters(String reportName, String historyID, Boolean forRendering, ParameterValue[] values, DataSourceCredentials[] credentials) in C:\Visual Studio Projects\Foo\Foo\Web References\Foo\Reference.cs:line 4112
at Foo.Foo.GetReportParameters(String username, String password, String reportName) in C:\Visual Studio Projects\Foo\Foo\Foo.asmx.cs:line 265
I am trying to call the GetReportParameters method from the ReportingServices2005.asmx web service from another C# function and I am getting the following error:
System.NotImplementedException: The method or operation is not implemented.
I litterally just copied the code from Microsoft's site here:
which is this code:
bool forRendering = false;
string historyID = null;
ParameterValue[] values = null;
DataSourceCredentials[] credentials = null;
ReportParameter[] parameters = null;
try
{
parameters = rs.GetReportParameters(reportName,historyID, forRendering, values,credentials);
if (parameters != null)
{
foreach (ReportParameter rp in parameters)
{
Console.WriteLine("Name: {0}", rp.Name);
}
}
}
catch (SoapException e)
{
error = e.Detail.InnerXml.ToString();
}
Where reportName
is a string with the name of the report.
Any ideas??
Thanks in advance!
EDIT
Here is the full stack trace:
System.NotImplementedException: The method or operation is not implemented.
at Foo.Foo.ReportingService2005.GetReportParameters(String reportName, String historyID, Boolean forRendering, ParameterValue[] values, DataSourceCredentials[] credentials) in C:\Visual Studio Projects\Foo\Foo\Web References\Foo\Reference.cs:line 4112
at Foo.Foo.GetReportParameters(String username, String password, String reportName) in C:\Visual Studio Projects\Foo\Foo\Foo.asmx.cs:line 265
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我删除并重新添加了 Web 引用,但这并没有解决问题,但是经过大量的试验和错误,我注意到我们
都引用了另一个 Web 引用....甚至不确定这是怎么可能的..但是,我删除了另一个与 Reporting Services 无关的 Web 参考现在一切正常。
I deleted and re-added the Web Reference and this didn't do the trick, but after lots of trial and error I noticed that
Were all referencing another Web Reference.... Not even sure how that's possible.. But, I deleted the other Web Reference that had nothing to do with Reporting Services and all is now working.