예제 #1
0
        /// <summary>
        /// This method is used to export the reports for the users who have read access for reports.
        /// </summary>
        /// <param name="apiExportReport">Report details (Report Id, Server path, Export type).</param>
        /// <returns>Status of exporting the report.</returns>

        public ApiExportReportResponse ExportReport(ApiExportReport apiExportReport)
        {
            var result   = _serverClientV2.Post(apiExportReport, _baseUrl + "/reports/export");
            var response = new ApiExportReportResponse();

            if (result != null)
            {
                return(JsonConvert.DeserializeObject <ApiExportReportResponse>(result.Content));
            }
            else
            {
                return(response);
            }
        }
        /// <summary>
        /// This method is used to export the reports with filterparameters for the users who have read access for reports.
        /// </summary>
        /// <param name="apiExportReport">Report details (Report Id, Server path, Export type).</param>
        /// <returns>Status of exporting the report.</returns>

        public ApiExportReportResponse ExportReportWithFilter(Guid reportId, string exportType, [FromUri] string filterParameters = null)
        {
            var result   = _serverClientV3.Post(reportId, _baseUrl + "/reports/" + reportId + "/" + exportType + "/export-filter?filterParameters=" + filterParameters);
            var response = new ApiExportReportResponse();

            if (result != null)
            {
                return(JsonConvert.DeserializeObject <ApiExportReportResponse>(result.Content));
            }
            else
            {
                return(response);
            }
        }