コード例 #1
0
        /// <summary>
        /// Gets the catalog items.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="recursive">if set to <c>true</c> [recursive].</param>
        /// <returns></returns>
        private static API.CatalogItem[] GetCatalogItems(string path, bool recursive)
        {
            ReportingServicesProvider provider = new ReportingServicesProvider();

            path = provider.GetFolderPath(path);
            var apiClient = provider.GetAPIClient(UserType.Browser);

            API.CatalogItem[] catalog;
            apiClient.ListChildren(null, path, recursive, out catalog);

            return(catalog);
        }
コード例 #2
0
        /// <summary>
        /// Gets the report parameter list.
        /// </summary>
        /// <param name="provider">The provider.</param>
        /// <param name="reportPath">The report path.</param>
        /// <returns></returns>
        public static List <string> GetReportParameterList(ReportingServicesProvider provider, string reportPath)
        {
            var client = provider.GetAPIClient(UserType.Browser);

            ItemParameter[] reportParams = null;
            client.GetItemParameters(null, reportPath, null, true, null, null, out reportParams);

            var paramNames = new List <string>();

            foreach (var p in reportParams)
            {
                paramNames.Add(p.Name);
            }

            return(paramNames);
        }