Skip to main content
All docs
V24.1

JSReportParametersPanel Class

A class that triggers events for the Standalone Report Parameters Panel and serves as the sender in callback functions.

Declaration

export class JSReportParametersPanel extends JSReportViewerBase<DevExpress.Reporting.Viewer.Internal.PreviewDisposableModelBase>

Inheritance

JSReportViewerBase<T>
JSReportParametersPanel

Methods

SerializeParametersState Method

Serializes parameter information from the Standalone Report Parameters Panel to a JSON string.

Declaration

SerializeParametersState(): string

Returns

Type Description
string

A string in JSON format that contains report parameter information.

Remarks

Use the SerializeParametersState method to get data for all panel parameters. You can send this data to the server to modify the report.

The following code example is the BeforeRender event handler for the Standalone Report Parameters Panel component:

function OnBeforeRender(sender, e) {
    const panel = sender.GetParametersModel();
    panel.buttons.push({
        onClick: () => {
            const data = sender.SerializeParametersState();
            $.ajax({
                url: "ExportWithParameters",
                method: 'POST',
                data: { serializedParameters: data, reportUrl: "@Model.ReportInfo.ReportUrl" }
            }).then(result => {
                alert(result.message);
            });
        },
        text: 'Send'
    });
    panel.showButtons = true;
}

For more information, review the following help topic: How to Use Parameter Values from the Standalone Report Parameters Panel (ASP.NET Core App).