We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Export filename in new version.

Thread ID:

Created:

Updated:

Platform:

Replies:

143677 Apr 1,2019 04:44 AM UTC Apr 2,2019 05:34 AM UTC Report Platform 4
loading
Tags: Report Viewer
David
Asked On April 1, 2019 04:44 AM UTC

When exporting the file from report viewer the downloaded filenames are defaulted to the report.pdf etc.

I've taken a look at https://www.syncfusion.com/forums/127285/reportviewer-export-filename but it seems the data is outdated. I've tried to use add a similar method by using the following:

onExportReport(args){
      args.formValues = [
          {
               key: "exportfileName",
               value: "RenamedReportName"
          }
     ];
}

but it doesn't seem to have any effect on the exported filename. How should I change exported filename in the new version of this control?


David
Replied On April 1, 2019 04:48 AM UTC

Forgot to mention in the actual report viewer control I've already set reportExport option to the above function

Mageshyadav M [Syncfusion]
Replied On April 1, 2019 05:58 PM UTC

Hi David, 
 
We have provided the solution for changing the export file name as like a workaround in earlier. Now, we have changed the support as properly in report viewer with event argument. Please make use of the exportItemClick event to change the file name of the exporting document from 17.1.0.38 version as shown below. 
 
    <script type="text/javascript"> 
        $(function () { 
            $("#viewer").ejReportViewer( 
                { 
                    reportServiceUrl: "/api/ReportsApi", 
                    reportPath: '~/App_Data/SalesOrderDetail.rdl', 
                    exportItemClick: "onExportItemClick", 
                }); 
        }); 
        function onExportItemClick(args) { 
            args.fileName = 'DemoReport'; 
        } 
    </script> 
 
But we have found some issue in updating filename hence we have generated the updated script patch file in version 17.1.0.38 which can be downloaded from below location, 
 
 
Regards, 
Mageshyadav.M 


David
Replied On April 2, 2019 04:26 AM UTC

Thanks Mageshyadav, I have confirmed that this works with the new patch. I also humbly suggest adding this detail to the documentation for report viewer export once this fix gets into the main branch.

Mageshyadav M [Syncfusion]
Replied On April 2, 2019 05:34 AM UTC

Hi David, 
  
We will update this detail in documentation for Report Viewer Export asap and we will include this fix in our next weekly nuget to be rolled out on April 9, 2019. 
  
Regards, 
Mageshyadav.M 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon