private static void SetupLocalProcessing(ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            reportViewer.ProcessingMode = ProcessingMode.Local;
            var localReport = reportViewer.LocalReport;

            localReport.ReportPath = parameters.ReportPath;

            if (parameters.ControlSettings?.EnableExternalImages != null && parameters.ControlSettings.EnableExternalImages.Value)
            {
                localReport.EnableExternalImages = true;
            }

            if (parameters.ReportParameters.Count > 0)
            {
                localReport.SetParameters(parameters.ReportParameters.Values);
            }

            // If parameters.LocalReportDataSources then we should get report data source
            // from local data source provider (ignore it for Report Runner)
            if (parameters.LocalReportDataSources == null && !parameters.IsReportRunnerExecution)
            {
                if (parameters.ControlId == null)
                {
                    throw new MvcReportViewerException("MvcReportViewer control ID is missing");
                }

                var dataSourceProvider = LocalReportDataSourceProviderFactory.Current.Create();
                var dataSources        = dataSourceProvider.Get((Guid)parameters.ControlId);
                localReport.DataSources.Clear();
                foreach (var dataSource in dataSources)
                {
                    localReport.DataSources.Add(dataSource);
                }
            }
        }
Beispiel #2
0
        private ReportViewerParameters InitializeDefaults()
        {
            var  isAzureSSRS = ConfigurationManager.AppSettings[WebConfigSettings.IsAzureSSRS];
            bool isAzureSSRSValue;

            if (string.IsNullOrEmpty(isAzureSSRS) || !bool.TryParse(isAzureSSRS, out isAzureSSRSValue))
            {
                isAzureSSRSValue = false;
            }

            var  isLocal = ConfigurationManager.AppSettings[WebConfigSettings.IsLocal];
            bool isLocalValue;

            if (string.IsNullOrEmpty(isLocal) || !bool.TryParse(isLocal, out isLocalValue))
            {
                isLocalValue = false;
            }

            var parameters = new ReportViewerParameters
            {
                ReportServerUrl = ConfigurationManager.AppSettings[WebConfigSettings.Server],
                Username        = ConfigurationManager.AppSettings[WebConfigSettings.Username],
                Password        = ConfigurationManager.AppSettings[WebConfigSettings.Password],
                IsAzureSSRS     = isAzureSSRSValue,
                IsLocal         = isLocalValue
            };

            return(parameters);
        }
        private static void SetupRemoteProcessing(ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            reportViewer.ProcessingMode = ProcessingMode.Remote;
            var serverReport = reportViewer.ServerReport;

            serverReport.ReportServerUrl = new Uri(parameters.ReportServerUrl);
            serverReport.ReportPath      = parameters.ReportPath;
            if (!string.IsNullOrEmpty(parameters.Username))
            {
                if (parameters.IsAzureSsrs)
                {
                    var server = serverReport.ReportServerUrl.Host;
                    serverReport.ReportServerCredentials = new AzureReportServerCredentials(
                        parameters.Username,
                        parameters.Password,
                        server);
                }
                else
                {
                    serverReport.ReportServerCredentials = new ReportServerCredentials(
                        parameters.Username,
                        parameters.Password);
                }
            }

            if (parameters.ReportParameters.Count > 0)
            {
                serverReport.SetParameters(parameters.ReportParameters.Values);
            }
        }
        public static void Initialize(this ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            reportViewer.ProcessingMode = ProcessingMode.Remote;

            var serverReport = reportViewer.ServerReport;
            serverReport.ReportServerUrl = new Uri(parameters.ReportServerUrl);
            serverReport.ReportPath = parameters.ReportPath;
            if (!string.IsNullOrEmpty(parameters.Username))
            {
                if (parameters.IsAzureSSRS)
                {
                    var server = serverReport.ReportServerUrl.Host;
                    serverReport.ReportServerCredentials = new AzureReportServerCredentials(
                        parameters.Username,
                        parameters.Password,
                        server);
                }
                else
                {
                    serverReport.ReportServerCredentials = new ReportServerCredentials(
                        parameters.Username,
                        parameters.Password);
                }
            }

            if (parameters.ReportParameters.Count > 0)
            {
                serverReport.SetParameters(parameters.ReportParameters.Values);
            }

            SetReportViewerSettings(reportViewer, parameters.ControlSettings);
        }
Beispiel #5
0
        private static void SetupLocalProcessing(ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            if (parameters.ControlId == null)
            {
                throw new MvcReportViewerException("MvcReportViewer control ID is missing");
            }

            reportViewer.ProcessingMode = ProcessingMode.Local;
            var localReport = reportViewer.LocalReport;

            localReport.ReportPath = parameters.ReportPath;

            if (parameters.ReportParameters.Count > 0)
            {
                localReport.SetParameters(parameters.ReportParameters.Values);
            }

            var dataSourceProvider = GetLocalReportDataProvider();
            var dataSources        = dataSourceProvider.Get((Guid)parameters.ControlId);

            localReport.DataSources.Clear();
            foreach (var dataSource in dataSources)
            {
                localReport.DataSources.Add(dataSource);
            }
        }
Beispiel #6
0
        public static void Initialize(this ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            reportViewer.ProcessingMode = ProcessingMode.Remote;

            var serverReport = reportViewer.ServerReport;

            serverReport.ReportServerUrl = new Uri(parameters.ReportServerUrl);
            serverReport.ReportPath      = parameters.ReportPath;
            if (!string.IsNullOrEmpty(parameters.Username))
            {
                if (parameters.IsAzureSSRS)
                {
                    var server = serverReport.ReportServerUrl.Host;
                    serverReport.ReportServerCredentials = new AzureReportServerCredentials(
                        parameters.Username,
                        parameters.Password,
                        server);
                }
                else
                {
                    serverReport.ReportServerCredentials = new ReportServerCredentials(
                        parameters.Username,
                        parameters.Password);
                }
            }

            if (parameters.ReportParameters.Count > 0)
            {
                serverReport.SetParameters(parameters.ReportParameters.Values);
            }

            SetReportViewerSettings(reportViewer, parameters.ControlSettings);
        }
 private static void ResetDefaultCredentials(NameValueCollection queryString, ReportViewerParameters parameters)
 {
     if (queryString.ContainsKeyIgnoreCase(UriParameters.Username) ||
         queryString.ContainsKeyIgnoreCase(UriParameters.Password))
     {
         parameters.Username = string.Empty;
         parameters.Password = string.Empty;
     }
 }
 private static void ResetDefaultCredentials(NameValueCollection queryString, ReportViewerParameters parameters)
 {
     if (queryString.ContainsKeyIgnoreCase(UriParameters.Username) ||
         queryString.ContainsKeyIgnoreCase(UriParameters.Password))
     {
         parameters.Username = string.Empty;
         parameters.Password = string.Empty;
     }
 }
Beispiel #9
0
        private ReportViewerParameters InitializeDefaults()
        {
            var parameters = new ReportViewerParameters
            {
                ReportServerUrl = ConfigurationManager.AppSettings[WebConfigSettings.Server],
                Username        = ConfigurationManager.AppSettings[WebConfigSettings.Username],
                Password        = ConfigurationManager.AppSettings[WebConfigSettings.Password]
            };

            return(parameters);
        }
Beispiel #10
0
        private static void LocalReports(ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            reportViewer.ProcessingMode = ProcessingMode.Local;
            var localReport = reportViewer.LocalReport;

            localReport.ReportPath = parameters.ReportPath;
            if (parameters.ReportParameters.Count > 0)
            {
                localReport.SetParameters(parameters.ReportParameters.Values);
            }
        }
Beispiel #11
0
        private ReportViewerParameters InitializeDefaults()
        {
            var parameters = new ReportViewerParameters
            {
                ReportServerUrl = Config.ReportServerUrl,
                Username        = Config.Username,
                Password        = Config.Password,
                IsAzureSsrs     = Config.IsAzureSSRS
            };

            return(parameters);
        }
        private static void SetupLocalProcessing(ReportViewer reportViewer, ReportViewerParameters parameters, IReportViewerEventsHandler handlers)
        {
            reportViewer.ProcessingMode = ProcessingMode.Local;
            var localReport = reportViewer.LocalReport;
            localReport.ReportPath = parameters.ReportPath;

            if (parameters.ControlSettings?.UseCurrentAppDomainPermissionSet != null &&
                parameters.ControlSettings.UseCurrentAppDomainPermissionSet.Value)
            {
                localReport.SetBasePermissionsForSandboxAppDomain(AppDomain.CurrentDomain.PermissionSet.Copy());
            }

            if (parameters.ControlSettings?.EnableExternalImages != null &&
                parameters.ControlSettings.EnableExternalImages.Value)
            {
                localReport.EnableExternalImages = true;
            }

            if (parameters.ControlSettings?.EnableHyperlinks != null &&
                parameters.ControlSettings.EnableHyperlinks.Value)
            {
                localReport.EnableHyperlinks = true;
            }

            if (parameters.ReportParameters.Count > 0)
            {
                localReport.SetParameters(parameters.ReportParameters.Values);
            }

            if (handlers != null)
            {
                localReport.SubreportProcessing += (sender, e) => handlers.OnSubreportProcessing(reportViewer, e);
            }

            // If parameters.LocalReportDataSources then we should get report data source
            // from local data source provider (ignore it for Report Runner)
            if (parameters.LocalReportDataSources == null && !parameters.IsReportRunnerExecution)
            {
                if (parameters.ControlId == null)
                {
                    throw new MvcReportViewerException("MvcReportViewer control ID is missing");
                }

                var dataSourceProvider = LocalReportDataSourceProviderFactory.Current.Create();
                var dataSources = dataSourceProvider.Get((Guid)parameters.ControlId);
                localReport.DataSources.Clear();
                foreach (var dataSource in dataSources)
                {
                    localReport.DataSources.Add(dataSource);
                }
            }
            
        }
Beispiel #13
0
        private static void SetupLocalProcessing(ReportViewer reportViewer, ReportViewerParameters parameters, IReportViewerEventsHandler handlers)
        {
            reportViewer.ProcessingMode = ProcessingMode.Local;
            var localReport = reportViewer.LocalReport;

            localReport.ReportPath = parameters.ReportPath;

            if (parameters.ControlSettings?.UseCurrentAppDomainPermissionSet != null &&
                parameters.ControlSettings.UseCurrentAppDomainPermissionSet.Value)
            {
                localReport.SetBasePermissionsForSandboxAppDomain(AppDomain.CurrentDomain.PermissionSet.Copy());
            }

            if (parameters.ControlSettings?.EnableExternalImages != null &&
                parameters.ControlSettings.EnableExternalImages.Value)
            {
                localReport.EnableExternalImages = true;
            }

            if (parameters.ControlSettings?.EnableHyperlinks != null &&
                parameters.ControlSettings.EnableHyperlinks.Value)
            {
                localReport.EnableHyperlinks = true;
            }

            if (parameters.ReportParameters.Count > 0)
            {
                localReport.SetParameters(parameters.ReportParameters.Values);
            }

            if (handlers != null)
            {
                localReport.SubreportProcessing += (sender, e) => handlers.OnSubreportProcessing(reportViewer, e);
            }

            // If parameters.LocalReportDataSources then we should get report data source
            // from local data source provider (ignore it for Report Runner)
            if (parameters.LocalReportDataSources == null && !parameters.IsReportRunnerExecution)
            {
                if (parameters.ControlId == null)
                {
                    throw new MvcReportViewerException("MvcReportViewer control ID is missing");
                }

                var dataSourceProvider = LocalReportDataSourceProviderFactory.Current.Create();
                var dataSources        = dataSourceProvider.Get((Guid)parameters.ControlId);
                localReport.DataSources.Clear();
                foreach (var dataSource in dataSources)
                {
                    localReport.DataSources.Add(dataSource);
                }
            }
        }
Beispiel #14
0
 public static void Initialize(this ReportViewer reportViewer, ReportViewerParameters parameters)
 {
     if (parameters.IsLocal)
     {
         LocalReports(reportViewer, parameters);
     }
     else
     {
         ServerReports(reportViewer, parameters);
     }
     SetReportViewerSettings(reportViewer, parameters.ControlSettings);
 }
        public static void Initialize(this ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            if (parameters.ProcessingMode == ProcessingMode.Remote)
            {
                SetupRemoteProcessing(reportViewer, parameters);
            }
            else
            {
                SetupLocalProcessing(reportViewer, parameters);
            }

            SetReportViewerSettings(reportViewer, parameters.ControlSettings);
        }
        public static void Initialize(this ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            if (parameters.ProcessingMode == ProcessingMode.Remote)
            {
                SetupRemoteProcessing(reportViewer, parameters);
            }
            else
            {
                SetupLocalProcessing(reportViewer, parameters);
            }

            SetReportViewerSettings(reportViewer, parameters.ControlSettings);
        }
Beispiel #17
0
        public static void Initialize(this ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            var handlers = CreateEventHandlers(parameters);

            if (parameters.ProcessingMode == ProcessingMode.Remote)
            {
                SetupRemoteProcessing(reportViewer, parameters);
            }
            else
            {
                SetupLocalProcessing(reportViewer, parameters, handlers);
            }

            if (handlers != null)
            {
                reportViewer.Drillthrough += (sender, e) => handlers.OnDrillthrough(reportViewer, e);
            }

            SetReportViewerSettings(reportViewer, parameters.ControlSettings);
        }
        private void RegisterJavaScriptApi(ReportViewerParameters parameters)
        {
            if (parameters.ControlSettings.AsyncPostBackTimeout != null)
            {
                ScriptManager.AsyncPostBackTimeout = (int)parameters.ControlSettings.AsyncPostBackTimeout;
            }

            var javaScriptApi = _config.AspxViewerJavaScript;
            if (string.IsNullOrEmpty(javaScriptApi))
            {
                throw new MvcReportViewerException("MvcReportViewer.js location is not found. Make sure you have MvcReportViewer.AspxViewerJavaScript in your Web.config.");
            }

            if (javaScriptApi.StartsWith("~"))
            {
                javaScriptApi = VirtualPathUtility.ToAbsolute(javaScriptApi);
            }

            ClientScript.RegisterClientScriptInclude("JavaScriptAPI", javaScriptApi);
        }
        public static void Initialize(this ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            reportViewer.ProcessingMode = ProcessingMode.Remote;
            reportViewer.ShowParameterPrompts = parameters.ShowParameterPrompts;

            var serverReport = reportViewer.ServerReport;
            serverReport.ReportServerUrl = new Uri(parameters.ReportServerUrl);
            serverReport.ReportPath = parameters.ReportPath;
            if (!string.IsNullOrEmpty(parameters.Username))
            {
                serverReport.ReportServerCredentials = new ReportServerCredentials(
                    parameters.Username,
                    parameters.Password);
            }

            if (parameters.ReportParameters.Count > 0)
            {
                serverReport.SetParameters(parameters.ReportParameters.Values);
            }
        }
        public static void Initialize(this ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            var handlers = CreateEventHandlers(parameters);

            if (parameters.ProcessingMode == ProcessingMode.Remote)
            {
                SetupRemoteProcessing(reportViewer, parameters);
            }
            else
            {
                SetupLocalProcessing(reportViewer, parameters, handlers);
            }

            if (handlers != null)
            {
                reportViewer.Drillthrough += (sender, e) => handlers.OnDrillthrough(reportViewer, e);
            }

            SetReportViewerSettings(reportViewer, parameters.ControlSettings);
        }
Beispiel #21
0
        private void RegisterJavaScriptApi(ReportViewerParameters parameters)
        {
            if (parameters.ControlSettings.AsyncPostBackTimeout != null)
            {
                ScriptManager.AsyncPostBackTimeout = (int)parameters.ControlSettings.AsyncPostBackTimeout;
            }

            var javaScriptApi = _config.AspxViewerJavaScript;

            if (string.IsNullOrEmpty(javaScriptApi))
            {
                throw new MvcReportViewerException("MvcReportViewer.js location is not found. Make sure you have MvcReportViewer.AspxViewerJavaScript in your Web.config.");
            }

            if (javaScriptApi.StartsWith("~"))
            {
                javaScriptApi = VirtualPathUtility.ToAbsolute(javaScriptApi);
            }

            ClientScript.RegisterClientScriptInclude("JavaScriptAPI", javaScriptApi);
        }
Beispiel #22
0
        public ReportRunner(
            ReportFormat reportFormat,
            string reportPath,
            string reportServerUrl,
            string username,
            string password,
            IEnumerable <KeyValuePair <string, object> > reportParameters,
            ProcessingMode mode = ProcessingMode.Remote,
            IDictionary <string, DataTable> localReportDataSources = null,
            string filename = null)
        {
            _viewerParameters = new ReportViewerParameters
            {
                ReportServerUrl         = _config.ReportServerUrl,
                Username                = _config.Username,
                Password                = _config.Password,
                IsReportRunnerExecution = true
            };

            ReportFormat = reportFormat;
            _filename    = filename;

            _viewerParameters.ProcessingMode = mode;
            if (mode == ProcessingMode.Local && localReportDataSources != null)
            {
                _viewerParameters.LocalReportDataSources = localReportDataSources;
            }

            _viewerParameters.ReportPath      = reportPath;
            _viewerParameters.ReportServerUrl = reportServerUrl ?? _viewerParameters.ReportServerUrl;
            if (username != null || password != null)
            {
                _viewerParameters.Username = username;
                _viewerParameters.Password = password;
            }

            ParseParameters(reportParameters);
        }
        private static void SetupLocalProcessing(ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            reportViewer.ProcessingMode = ProcessingMode.Local;
            var localReport = reportViewer.LocalReport;

            parameters.ReportLoader.LoadReportTo(reportViewer);

            if(parameters.ControlSettings != null &&  parameters.ControlSettings.EnableExternalImages != null && parameters.ControlSettings.EnableExternalImages.Value)
                localReport.EnableExternalImages = true;

            if (parameters.ReportParameters.Count > 0)
            {
                localReport.SetParameters(parameters.ReportParameters.Values);
            }

            // If parameters.LocalReportDataSources then we should get report data source
            // from local data source provider (ignore it for Report Runner)
            if (parameters.ReportDataSources == null && !parameters.IsReportRunnerExecution)
            {
                if (parameters.ControlId == null)
                {
                    throw new MvcReportViewerException("MvcReportViewer control ID is missing");
                }

                var dataSourceProvider = LocalReportDataSourceProviderFactory.Current.Create();
                var dataSources = dataSourceProvider.Get((Guid)parameters.ControlId);
                localReport.DataSources.Clear();
                foreach (var dataSource in dataSources)
                {
                    localReport.DataSources.Add(dataSource);
                }

                localReport.SubreportProcessing += (sender, e) =>
                {
                    //var dataSourceProvider = LocalReportDataSourceProviderFactory.Current.Create();
                    var subReportDataSources = dataSourceProvider.GetSubReport((Guid)parameters.ControlId, e.ReportPath);

                    foreach (var dataSource in subReportDataSources)
                    {
                        var reportDataSource = dataSource.CreateDataSource(e.Parameters);

                        e.DataSources.Add(reportDataSource);
                    }
                };
            }

            localReport.ShowDetailedSubreportMessages = true;
        }
Beispiel #24
0
 private static IReportViewerEventsHandler CreateEventHandlers(ReportViewerParameters parameters)
 {
     return(CreateEventHandlers(parameters.EventsHandlerType));
 }
        private ReportViewerParameters InitializeDefaults()
        {
            var parameters = new ReportViewerParameters
                {
                    ReportServerUrl = ConfigurationManager.AppSettings[WebConfigSettings.Server],
                    Username = ConfigurationManager.AppSettings[WebConfigSettings.Username],
                    Password = ConfigurationManager.AppSettings[WebConfigSettings.Password]
                };

            return parameters;
        }
        private static void SetupLocalProcessing(ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            reportViewer.ProcessingMode = ProcessingMode.Local;
            var localReport = reportViewer.LocalReport;
            localReport.ReportPath = parameters.ReportPath;

            if(parameters.ControlSettings != null &&  parameters.ControlSettings.EnableExternalImages != null && parameters.ControlSettings.EnableExternalImages.Value)
                localReport.EnableExternalImages = true;

            if (parameters.ReportParameters.Count > 0)
            {
                localReport.SetParameters(parameters.ReportParameters.Values);
            }

            // If parameters.LocalReportDataSources then we should get report data source
            // from local data source provider (ignore it for Report Runner)
            if (parameters.LocalReportDataSources == null && !parameters.IsReportRunnerExecution)
            {
                if (parameters.ControlId == null)
                {
                    throw new MvcReportViewerException("MvcReportViewer control ID is missing");
                }

                var dataSourceProvider = LocalReportDataSourceProviderFactory.Current.Create();
                var dataSources = dataSourceProvider.Get((Guid)parameters.ControlId);
                localReport.DataSources.Clear();
                foreach (var dataSource in dataSources)
                {
                    localReport.DataSources.Add(dataSource);
                }
            }
        }
Beispiel #27
0
        public ReportRunner(
            ReportFormat reportFormat,
            string reportPath,
            string reportServerUrl,
            string username,
            string password,
            IEnumerable<KeyValuePair<string, object>> reportParameters,
            ProcessingMode mode = ProcessingMode.Remote,
            IDictionary<string, DataTable> localReportDataSources = null,
            string filename = null)
        {
            _viewerParameters = new ReportViewerParameters
            {
                ReportServerUrl = _config.ReportServerUrl,
                Username = _config.Username,
                Password = _config.Password,
                IsReportRunnerExecution = true
            };

            ReportFormat = reportFormat;
            _filename = filename;

            _viewerParameters.ProcessingMode = mode;
            if (mode == ProcessingMode.Local && localReportDataSources != null)
            {
                _viewerParameters.LocalReportDataSources = localReportDataSources;
            }

            _viewerParameters.ReportPath = reportPath;
            _viewerParameters.ReportServerUrl = reportServerUrl ?? _viewerParameters.ReportServerUrl;
            if (username != null || password != null)
            {
                _viewerParameters.Username = username;
                _viewerParameters.Password = password;
            }

            ParseParameters(reportParameters);
        }
        private ReportViewerParameters InitializeDefaults()
        {
            var isAzureSsrs = ConfigurationManager.AppSettings[WebConfigSettings.IsAzureSsrs];
            bool isAzureSsrsValue;
            if (string.IsNullOrEmpty(isAzureSsrs) || !bool.TryParse(isAzureSsrs, out isAzureSsrsValue))
            {
                isAzureSsrsValue = false;
            }

            var parameters = new ReportViewerParameters
                {
                    ReportServerUrl = ConfigurationManager.AppSettings[WebConfigSettings.Server],
                    Username = ConfigurationManager.AppSettings[WebConfigSettings.Username],
                    Password = ConfigurationManager.AppSettings[WebConfigSettings.Password],
                    IsAzureSsrs = isAzureSsrsValue
                };

            return parameters;
        }
 private static IDictionary<string, ReportParameter> GetParameterCollection(ReportViewerParameters parameters, bool isHighPriority)
 {
     return isHighPriority ? parameters.InitialParameters : parameters.ReportParameters;
 }
        private static void SetupRemoteProcessing(ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            reportViewer.ProcessingMode = ProcessingMode.Remote;
            var serverReport = reportViewer.ServerReport;
            serverReport.ReportServerUrl = new Uri(parameters.ReportServerUrl);
            serverReport.ReportPath = parameters.ReportPath;
            if (!string.IsNullOrEmpty(parameters.Username))
            {
                if (parameters.IsAzureSsrs)
                {
                    var server = serverReport.ReportServerUrl.Host;
                    serverReport.ReportServerCredentials = new AzureReportServerCredentials(
                        parameters.Username,
                        parameters.Password,
                        server);
                }
                else
                {
                    serverReport.ReportServerCredentials = new ReportServerCredentials(
                        parameters.Username,
                        parameters.Password);
                }
            }

            if (parameters.ReportParameters.Count > 0)
            {
                serverReport.SetParameters(parameters.ReportParameters.Values);
            }
        }
        private ReportViewerParameters InitializeDefaults()
        {
            var parameters = new ReportViewerParameters
                {
                    ReportServerUrl = _config.ReportServerUrl,
                    Username = _config.Username,
                    Password = _config.Password,
                    IsAzureSsrs = _config.IsAzureSSRS
                };

            return parameters;
        }
 private static IReportViewerEventsHandler CreateEventHandlers(ReportViewerParameters parameters)
 {
     return CreateEventHandlers(parameters.EventsHandlerType);
 }
        private static void SetupRemoteProcessing(ReportViewer reportViewer, ReportViewerParameters parameters)
        {
            reportViewer.ProcessingMode = ProcessingMode.Remote;
            var serverReport = reportViewer.ServerReport;

            parameters.ReportLoader.LoadReportTo(reportViewer);

            if (parameters.ReportParameters.Count > 0)
            {
                serverReport.SetParameters(parameters.ReportParameters.Values);
            }
        }