Back to Devexpress

ASPxReportDesigner.StaticInitialize() Method

xtrareports-devexpress-dot-xtrareports-dot-web-dot-aspxreportdesigner.md

latest8.1 KB
Original Source

ASPxReportDesigner.StaticInitialize() Method

Explicitly starts the Report Designer initialization.

Namespace : DevExpress.XtraReports.Web

Assembly : DevExpress.XtraReports.v25.2.Web.WebForms.dll

NuGet Package : DevExpress.Web.Reporting

Declaration

csharp
public static void StaticInitialize()
vb
Public Shared Sub StaticInitialize

Remarks

The ASPxReportDesigner is automatically initialized when rendering on your application’s Web page, but in specific cases, you need to trigger its initialization explicitly (for instance, when an AppPool is recycled).

The StaticInitialize method does the following:

  • Calls the static ASPxReportDesigner constructor;
  • Registers HttpHandlers required for the Report Designer, Web Document Viewer and Query Builder;
  • Initializes all services for processing requests to the corresponding handlers.

Use the StaticInitialize method at the application startup in the Global.asax file.

Note

To make the Report Designer’s handlers work correctly, you should call this method after specifying the session state and registering additional services.

csharp
protected void Application_Start(Object sender, EventArgs e) {
    // ...  
   DevExpress.XtraReports.Web.ReportDesigner.Native.ReportDesignerBootstrapper.SessionState = 
        System.Web.SessionState.SessionStateBehavior.Required;
    // ...  
    DevExpress.XtraReports.Web.ASPxReportDesigner.StaticInitialize();
}
vb
Protected Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
    ' ...  
    DevExpress.XtraReports.Web.ReportDesigner.Native.ReportDesignerBootstrapper.SessionState = 
        System.Web.SessionState.SessionStateBehavior.Required
    ' ...  
    DevExpress.XtraReports.Web.ASPxReportDesigner.StaticInitialize
End Sub

The following code snippets (auto-collected from DevExpress Examples) contain references to the StaticInitialize() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

reporting-web-customize-web-report-wizard/CS/WebFormsWizardCustomization/Global.asax.cs#L16

csharp
DefaultReportDesignerContainer.RegisterDataSourceWizardConfigFileJsonConnectionStringsProvider();
ASPxReportDesigner.StaticInitialize();

reporting-web-forms-localization/CS/SubstituteLocalizationStringsExample/Global.asax.cs#L18

csharp
System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12;
ASPxReportDesigner.StaticInitialize();

reporting-web-mvc-viewer-clustering/CS/DevExpressWebFarmsWebGardenReporting/Global.asax.cs#L23

csharp
DefaultWebDocumentViewerContainer.RegisterSingleton<CacheCleanerSettings>(cacheCleanerSettings);
    DevExpress.XtraReports.Web.ASPxReportDesigner.StaticInitialize();
}

reporting-asp-net-mvc-create-custom-control/CS/Reporting_AspNetMvc_Create_Custom_Control/Global.asax.cs#L26

csharp
System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12;
            MVCxReportDesigner.StaticInitialize();

reporting-mvc-customized-parameter-editor/CS/ParameterEditorAspNetMvcExample/Global.asax.cs#L26

csharp
System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12;
            MVCxReportDesigner.StaticInitialize();

reporting-web-forms-localization/VB/SubstituteLocalizationStringsExample/Global.asax.vb#L20

vb
System.Net.ServicePointManager.SecurityProtocol = System.Net.ServicePointManager.SecurityProtocol Or System.Net.SecurityProtocolType.Tls12
ASPxReportDesigner.StaticInitialize()

reporting-web-mvc-viewer-clustering/VB/DevExpressWebFarmsWebGardenReporting/Global.asax.vb#L24

vb
DefaultWebDocumentViewerContainer.RegisterSingleton(Of CacheCleanerSettings)(cacheCleanerSettings)
    DevExpress.XtraReports.Web.ASPxReportDesigner.StaticInitialize()
End Sub

reporting-mvc-customized-parameter-editor/VB/ParameterEditorAspNetMvcExample/Global.asax.vb#L18

vb
System.Net.ServicePointManager.SecurityProtocol = System.Net.ServicePointManager.SecurityProtocol Or System.Net.SecurityProtocolType.Tls12
MVCxReportDesigner.StaticInitialize()
DevExpress.XtraReports.Web.ClientControls.LoggerService.Initialize(Sub(ex, message)

reporting-web-forms-designer-storage/VB/SimpleWebReportCatalog/Global.asax.vb#L16

vb
DevExpress.XtraReports.Web.Extensions.ReportStorageWebExtension.RegisterExtensionGlobal(New CustomReportStorageWebExtension())
DevExpress.XtraReports.Web.ASPxReportDesigner.StaticInitialize()

reporting-mvc-create-custom-color-scheme/VB/WebReportingCustomColorScheme/Global.asax.vb#L28

vb
System.Net.ServicePointManager.SecurityProtocol = System.Net.ServicePointManager.SecurityProtocol Or System.Net.SecurityProtocolType.Tls12
MVCxReportDesigner.StaticInitialize()

See Also

ASPxReportDesigner Class

ASPxReportDesigner Members

DevExpress.XtraReports.Web Namespace