Reporting Services- Web Service
来源:互联网 发布:java decompiler使用 编辑:程序博客网 时间:2024/05/19 22:02
这两天在工作中需要在报表服务器上面拿报表的列表,在此记录一下以免以后忘了。
首先需要在项目里面调用Reporting Services的服务:
添加完服务之后:
ReportingWS.ReportingService2010 rs = new ReportingService2010(); rs.Credentials = System.Net.CredentialCache.DefaultCredentials; ReportingWS.CatalogItem[] items = rs.ListChildren("/", true); DataTable dt = new DataTable(); dt.Columns.Add("text", typeof(string)); //数据类型为 文本 dt.Columns.Add("id", typeof(string)); #region 取报表列表 for (int i = 0; i < items.Length; i++) { //限制为用户waxdoll\\administrator创建的对象,其中对象又限制为文件夹和报表 string pcname = System.Environment.MachineName; //本地计算机名 string username = System.Environment.UserName; //本地计算机登录名 if (items[i].CreatedBy.ToLower() == (pcname + "\\" + username).ToLower()) { if (items[i].TypeName == "Report") dt.Rows.Add(items[i].Name, items[i].Path); } } #endregion
这样就可以拿到所有的报表,当然我这上面是过滤了文件夹,支取后缀名为report的列表,如果需要文件夹的话可以在上面再加一个条件:item[1].type==”Folder”这样就可以拿到文件夹的名称了。
阅读全文
0 0
- Reporting Services : Web Service
- Reporting Services- Web Service
- Using Reporting Services SharePoint Web Parts in SQL Server 2000 Reporting Services Service Pack 2
- run report through call reporting services web service
- Web Access Reporting Services
- Reporting Services
- Reporting Services
- Reporting Services
- Reporting services
- Reporting Service 和 SQL Server Integration Services 服务不能启动
- Reporting Service在Web Application中的应用
- Asp.Net Web Form 调用Reporting Service
- 通过程序的方式将Reporting Service 报表转成 PDF--- SQL Server Reporting Services 2005
- Using Reporting Services SharePoint Web Parts in SQL Server
- Reporting Services 中 Web服务URL 与 报表管理器URL
- Reporting Services 中 Web服务URL 与 报表管理器URL
- Reporting Service
- Reporting Service
- ajax 和jsonp 不是一码事 细读详解
- unity切换vs版本
- JAVA环境变量配置详解
- OC与Swift如何相互调用
- 哈希函数
- Reporting Services- Web Service
- c++多线程创建的几种方式
- st7789 320*240 显示屏,uboot驱动移植笔记
- PHP魔术方法汇总
- iOS,iOS10 跳转系统设置、WIFI、蓝牙…
- POJ 2195 Going Home 最小费用最大流(模板题)
- (72)资源和包
- C#学习笔记(三)—–C#高级特性:可空值类型
- shell中使用read如何换行