public CrcReportFolder Create(ReportingService2005Soap rService, string path) { var ret = new CrcReportFolder(); ret.Path = path; ret.FolderName = CrcReportDefinition.ReportNameFromPath(path); var lcRequest = new ListChildrenRequest(path, false); var lcResponse = rService.ListChildren(lcRequest); foreach (CatalogItem itemLoop in lcResponse.CatalogItems) { if (itemLoop.Type == ItemTypeEnum.Folder) { var sf = Create(rService, itemLoop.Path); if (sf.Reports.Count() > 0 || sf.SubFolders.Count() > 0) { ret.SubFolders.Add(sf); } } else if (itemLoop.Type == ItemTypeEnum.Report) { if (!itemLoop.Hidden) { var repItem = new CrcReportItem(); repItem.ReportPath = itemLoop.Path; repItem.DisplayName = itemLoop.Name; repItem.Description = itemLoop.Description; ret.Reports.Add(repItem); } } } return(ret); }
public CrcReportFolder Create(ReportingService2005Soap rService, string path) { var ret = new CrcReportFolder(); ret.Path = path; ret.FolderName = CrcReportDefinition.ReportNameFromPath(path); var lcRequest = new ListChildrenRequest(path, false); var lcResponse = rService.ListChildren(lcRequest); foreach (CatalogItem itemLoop in lcResponse.CatalogItems) { if (itemLoop.Type == ItemTypeEnum.Folder) { var sf = Create(rService, itemLoop.Path); if (sf.Reports.Count() > 0 || sf.SubFolders.Count() > 0) ret.SubFolders.Add(sf); } else if (itemLoop.Type == ItemTypeEnum.Report) { if (!itemLoop.Hidden) { var repItem = new CrcReportItem(); repItem.ReportPath = itemLoop.Path; repItem.DisplayName = itemLoop.Name; repItem.Description = itemLoop.Description; ret.Reports.Add(repItem); } } } return ret; }
public CatalogItem[] GetAllReportsNoCache(string username) { ReportingService2005Soap rService = m_ssrsSoapClientFactory.MakeSsrsSoapClient(); var lcRequest = new ListChildrenRequest() { Item = "/", Recursive = true }; //CatalogItem[] catalogItems = null; var lcResponse = rService.ListChildren(lcRequest); var reportsOnly = lcResponse.CatalogItems.Where(c => c.Type == ItemTypeEnum.Report).ToArray(); //var foldersOnly = lcResponse.CatalogItems.Where(c => c.Type == ItemTypeEnum.Folder).ToArray(); return(reportsOnly); }