private static ReportService.ReportingService2005 _initializeReportingService(ReportViewerModel model) { var service = new ReportService.ReportingService2005(); service.Url = model.ServerUrl + ((model.ServerUrl.ToSafeString().EndsWith("/")) ? "" : "/") + "ReportService2005.asmx"; service.Credentials = model.Credentials ?? System.Net.CredentialCache.DefaultCredentials; if (model.Timeout.HasValue) { service.Timeout = model.Timeout.Value; } return(service); }
public static ReportService.ReportParameter[] GetReportParameters(ReportViewerModel model, bool forRendering = false) { var service = new ReportService.ReportingService2005(); service.Url = model.ServerUrl + ((model.ServerUrl.ToSafeString().EndsWith("/")) ? "" : "/") + "ReportService2005.asmx"; service.Credentials = model.Credentials ?? System.Net.CredentialCache.DefaultCredentials; string historyID = null; ReportService.ParameterValue[] values = null; ReportService.DataSourceCredentials[] rsCredentials = null; var parameters = service.GetReportParameters(model.ReportPath, historyID, forRendering, values, rsCredentials); return(parameters); }