当前位置:网站首页>Reporting Services- Web Service
Reporting Services- Web Service
2022-07-29 05:59:00 【Denny Hui】
In these two days, I need to get the list of reports on the report server , Make a note here in case you forget .
First, it needs to be called in the project Reporting Services Service for : 


After adding the service :
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)); // The data type is Text
dt.Columns.Add("id", typeof(string));
#region Get the report list
for (int i = 0; i < items.Length; i++)
{
// Limit to users waxdoll\\administrator Objects created , Among them, the objects are limited to folders and reports
string pcname = System.Environment.MachineName; // Local computer name
string username = System.Environment.UserName; // Local computer login
if (items[i].CreatedBy.ToLower() == (pcname + "\\" + username).ToLower())
{
if (items[i].TypeName == "Report")
dt.Rows.Add(items[i].Name, items[i].Path);
}
}
#endregionSo you can get all the reports , Of course, I have filtered the folder above , The withdrawal suffix is report A list of , If you need a folder, you can add another condition on it :item[1].type==”Folder” So you can get the name of the folder .
边栏推荐
- Laravel service container (inheritance and events)
- Ribbon学习笔记一
- Spring, summer, autumn and winter with Miss Zhang (4)
- Most PHP programmers don't understand how to deploy safe code
- IDEA中设置自动build-改动代码,不用重启工程,刷新页面即可
- 有价值的博客、面经收集(持续更新)
- Show profiles of MySQL is used.
- 与张小姐的春夏秋冬(5)
- Basic use of array -- traverse the circular array to find the maximum value, minimum value, maximum subscript and minimum subscript of the array
- “山东大学移动互联网开发技术教学网站建设”项目实训日志二
猜你喜欢

并发编程学习笔记 之 ReentrantLock实现原理的探究
![[go] use of defer](/img/10/9e4e1c593870450c381a154f31ebef.png)
[go] use of defer

『全闪实测』数据库加速解决方案

Detailed explanation of MySQL statistical function count

【数据库】数据库课程设计一一疫苗接种数据库
![[database] database course design - vaccination database](/img/4d/e8aff67e3c643fae651c9f62af2db9.png)
[database] database course design - vaccination database

Move protocol global health declaration, carry out the health campaign to the end

ASM插桩:学完ASM Tree api,再也不用怕hook了

这些你一定要知道的进程知识

July 28 ens/usd Value Forecast: ENS attracts huge profits
随机推荐
[database] database course design - vaccination database
Study and research the way of programming
初探fastJson的AutoType
重庆大道云行作为软件产业代表受邀参加渝中区重点项目签约仪式
NIFI 改UTC时间为CST时间
在uni-app项目中,如何实现微信小程序openid的获取
Super simple integration HMS ml kit face detection to achieve cute stickers
Markdown syntax
MySql统计函数COUNT详解
Ribbon学习笔记一
中海油集团,桌面云&网盘存储系统应用案例
Thinkphp6 output QR code image format to solve the conflict with debug
Shanzhai coin Shib has a US $548.6 million stake in eth whale's portfolio - traders should be on guard
Ribbon学习笔记二
Use of file upload (2) -- upload to Alibaba cloud OSS file server
Gluster cluster management analysis
Huawei 2020 school recruitment written test programming questions read this article is enough (Part 2)
剑指核心-TaoCloud全闪SDS助力构建高性能云服务
isAccessible()方法:使用反射技巧让你的性能提升数倍
微信小程序源码获取(附工具的下载)