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. Image for the cookie policy date

Export filename in new version.

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:

      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?

4 Replies

DA David March 31, 2019 11:48 PM

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

MM Mageshyadav M Syncfusion Team April 1, 2019 12:58 PM

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 version as shown below. 
    <script type="text/javascript"> 
        $(function () { 
                    reportServiceUrl: "/api/ReportsApi", 
                    reportPath: '~/App_Data/SalesOrderDetail.rdl', 
                    exportItemClick: "onExportItemClick", 
        function onExportItemClick(args) { 
            args.fileName = 'DemoReport'; 
But we have found some issue in updating filename hence we have generated the updated script patch file in version which can be downloaded from below location, 

DA David April 1, 2019 11:26 PM

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.

MM Mageshyadav M Syncfusion Team April 2, 2019 12:34 AM

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. 

Live Chat Icon For mobile
Up arrow icon