Articles in this section
Category / Section

How to dispose the export event when dynamically changing the report

1 min read

Dispose the export event

 

If we changing the Report Path dynamically to load the report in Report Viewer then the export content is not refreshing. So we need to use _destory method with ReportViewer before creating the new instance to load the report

 

var reportviewerObj = $("#reportViewerTagID").data("ejReportViewer");   
reportviewerObj. _destroy() 

 

For example please find the below code sample.

<script type="text/javascript">
    var coundid = 1;
    function ShowReport() {
        coundid = coundid+ 1;
        $("#ejdReportViewer").ejDialog({ contentUrl: "/Home/ShowReports?setName=" + coundid, actionButtons: ["close", "maximize"], height: 900 });
        $("#ejdReportViewer").ejDialog("open");
 
        $("#ejdReportViewer").ejDialog({
            close: function (args) {
                var reportviewerObj = $("#rvReport").data("ejReportViewer");
                reportviewerObj._destroy();
            }
        });
 
    }
</script>

 

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