private void CheckLinkedFolderExists(ReportingService2010.ReportingService2010SoapClient rsService , ReportingService2010.TrustedUserHeader trusteduserHeader , ReportingService2010.SearchCondition condition , ReportingService2010.SearchCondition[] conditions , string linkedReportFolderPath ) { string parentFolderPath = @"/"; string[] folders = linkedReportFolderPath.Split('/'); for (int i = 0; i < folders.Length; i++) { if (!string.IsNullOrEmpty(folders[i])) { ReportingService2010.CatalogItem[] foundItems = null; condition.Values = new string[] { folders[i] }; rsService.FindItems(trusteduserHeader , parentFolderPath , ReportingService2010.BooleanOperatorEnum.And , new ReportingService2010.Property[0] , conditions , out foundItems); if (foundItems == null || (foundItems != null && foundItems.Count() == 0)) { ReportingService2010.CatalogItem linkedFolder = new ReportingService2010.CatalogItem(); rsService.CreateFolder(trusteduserHeader , folders[i] , parentFolderPath , new ReportingService2010.Property[0] , out linkedFolder ); } parentFolderPath = parentFolderPath.TrimEnd('/') + @"/" + folders[i]; } } }
public CataLogViewModel GetCatalog(string path = "/") { var vm = new CataLogViewModel(); vm.Path = path; ReportingService2010.CatalogItem[] items = new ReportingService2010.CatalogItem[0]; // Check Cache for Path this.m_client.Credentials = System.Net.CredentialCache.DefaultCredentials; items = this.m_client.ListChildren(path, false); foreach (var item in items) { var vmItem = new CatalogItemViewModel(); vmItem.CreatedBy = item.CreatedBy; vmItem.CreationDate = item.CreationDate; vmItem.Description = item.Description; vmItem.Name = item.Name; vmItem.Path = item.Path; vmItem.TypeName = item.TypeName; vmItem.VirtualPath = item.VirtualPath; vm.Items.Add(vmItem); } return vm; }
private void CheckLinkedFolderExists(ReportingService2010.ReportingService2010SoapClient rsService , ReportingService2010.TrustedUserHeader trusteduserHeader , ReportingService2010.SearchCondition condition , ReportingService2010.SearchCondition[] conditions , string linkedReportFolderPath ) { string parentFolderPath = @"/"; string[] folders = linkedReportFolderPath.Split('/'); for (int i = 0; i < folders.Length; i++) { if (!string.IsNullOrEmpty(folders[i])) { ReportingService2010.CatalogItem[] foundItems = null; condition.Values = new string[] { folders[i] }; rsService.FindItems(trusteduserHeader , parentFolderPath , ReportingService2010.BooleanOperatorEnum.And , new ReportingService2010.Property[0] , conditions , out foundItems); if (foundItems == null || (foundItems != null && foundItems.Count() == 0)) { ReportingService2010.CatalogItem linkedFolder = new ReportingService2010.CatalogItem(); rsService.CreateFolder(trusteduserHeader , folders[i] , parentFolderPath , new ReportingService2010.Property[0] , out linkedFolder ); } parentFolderPath = parentFolderPath.TrimEnd('/') + @"/" + folders[i]; } } }