Articles in this section
Category / Section

Rename the exporting documents at runtime in JS ReportViewer

1 min read

Rename the exporting documents at runtime in JS ReportViewer

This article describes how to rename the exporting documents at runtime in Syncfusion ReportViewer control. You can also refer to the Getting Started with JavaScript ReportViewer from the User Guide, available in the following link:

http://help.syncfusion.com/js/reportviewer/getting-started

Renaming exporting documents at runtime:

The JavaScript ReportViewer control allows you to rename the exporting documents at runtime when you perform export action. You can rename the document with the help of the reportExport event as shown in following code example.

    $(function () {
            $("#container").ejReportViewer(
            {
                reportServiceUrl: "../api/ReportApi",
                processingMode: ej.ReportViewer.ProcessingMode.Remote,
                reportPath: "~/ReportTemplate/SampleReport.rdl",
                reportExport: "onReportExport"
            });
        });      
        function onReportExport(args) {
            var exportName = $(args.exportAction).find('#' + this._id + '_exportfileName');
            exportName.val('DemoReport_01');
        }

 

ReportExport event:

The reportexport event fires when you perform the export action in ReportViewer.

Demo Sample

You can download the Demo Sample from the following link.

https://www.syncfusion.com/downloads/support/directtrac/general/ze/ExportRenameSample199402591.zip

Further References

You can find documentation and demo samples for JavaScript ReportViewer Control from the following links.

http://js.syncfusion.com/demos/web/

http://help.syncfusion.com/js/overview

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied