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

JSReportParametersPanel Class

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

#Declaration

TypeScript
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

TypeScript
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).