Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IReportParametersSerializer Interface

In This Article

Defines methods that enable you to deserialize parameters received from the Standalone Report Parameters Panel component and apply parameters to a report instance.

Namespace: DevExpress.XtraReports.Web.ParametersPanel

Assembly: DevExpress.XtraReports.v24.2.Web.dll

NuGet Package: DevExpress.Web.Reporting.Common

#Declaration

public interface IReportParametersSerializer

#Remarks

The default implementation of IReportParametersSerializer is registered at application startup within the AddDevExpressControls method call. In the controller action, you can get the service from the request services:

C#
public async Task<IActionResult> ExportWithParameters(
[FromServices] IReportParametersSerializer reportParametersSerializer,
[FromServices] IWebHostEnvironment env,
[FromForm] string serializedParameters,
[FromForm] string reportUrl) {
    var report = await reportParametersSerializer.ApplyParametersStateAsync(reportUrl,
        serializedParameters);
    report.ExportToPdf(Path.Combine(env.ContentRootPath,
        "Reports", $"{reportUrl}.pdf"));
    return Ok(new { message = "Report exported successfully" });
}

Serialized parameters are obtained from the client as a result of the SerializeParametersState method.

Note that one of the IReportParametersSerializer.GetModel method parameters is a report string identifier (reportUrl), so the application must have the report name resolution service (IReportProvider or ReportStorageWebExtension) implemented and registered at application startup.

See Also