高分求 Reporting Service 问题 解决方案
我要开发一个报表系统,用到 Reporting Service,报表服务的部署都没有问题,现在,我要自己定义报表,相信各位做过的大虾都有经验,就是引用Reporting service的一组接口,现在网上的这方面资料也挺多的,可是我在一个地方翻了船,怎么也过不去了。
我的过程:
1 :建立一个Reporting service 项目,名字“testReportservice”
2 : 设计好数据源和报表report1.rdl
3 :部署他们,成功
4 :建立新web项目作为客户端访问服务
5:引用ReportService2005.asmx这个接口,在客户端生成代理类 Report.ReportingService rs = new Report.ReportingService();
//就是这里
6:调用方法返回报表的DataSourceDefinition
我的方法:
Report.DataSourceDefinition ds = null;
ds = this.rs.GetDataSourceContents("/testReportService/Report1");//其中testReportService是服务端项目名, Report1是报表名。
这个方法特别的简单,好像谁也没有在这里碰到什么异常,但是我的代码走到这里就报
System.Web.Services.Protocols.SoapException: 试图对项“/testReportService/Report1”执行的操作对于此项类型而言是不允许的。 ---> Microsoft.ReportingServices.Diagnostics.Utilities.WrongItemTypeException: 试图对项“/testReportService/Report1”执行的操作对于此项类型而言是不允许的。
在 Microsoft.ReportingServices.Library.RSService.EnsureItemType(ItemType actualType, ItemType expectedType, String path)
在 Microsoft.ReportingServices.Library.GetDataSourceContentsAction.GetDataSourceContents(String path)
在 Microsoft.ReportingServices.WebServer.ReportingService2005.GetDataSourceContents(String DataSource, DataSourceDefinition& Definition)
--- 内部异常堆栈跟踪的结尾 ---
在 Microsoft.ReportingServices.WebServer.ReportingService2005.GetDataSourceContents(String DataSource, DataSourceDefinition& Definition)
我实在是没办法了,请大家帮忙!!!!!!!!!
ps:我在客户端查看报表,向服务端传参数都没有问题!!!!