Do you know you can export File Name in SSRS Report Viewer in ASP.NET ?
In SQL Server Reporting Services ReportViewer control, if one needs to set up the default file name for Export then in page_load or other appropriate event following line of code will work out setting up the file name !
ReportViewerControl.ServerReport.DisplayName = “YOUR DESIRED NAME”
If you liked this article, then please subscribe to our Blog for more updates like this. You can also connect me on Twitter, LinkedIn and GitHub.
Thanks. Just what I was looking for!
You welcome !
Thank you very much…
It was so helpful for me
Glad to hear that 🙂
If I want to name the report according to the parameters passed
i.e Am passing Parameter1 and Parameter2 then I need the report name as
Thanks in advance
You need to do merge both parameter in page load and than apply it , you can do that by creating third parameter to apply this transition or by variable ( if you use new parameter than make sure its transitive ( i.e generated from parameter 1 and 2 and no user input required )
Hope this help!
I believe this is the solution to my problem but I don’t know how to apply it. Could you provide more guidance or an illustration? To be sure: I want to run an SSRS 2014 report against an Oracle 10 database by invoking this report by URL from another report. I want the 2nd report results to output to a CSV file with a particular name and for the user to be aware this has occurred. So far I have the 1st report invoking the 2nd and when the repot is ready it prompts the user to open or save the CSV file.
Jeff , Do you render report using Report Viewer or you specify export as parameter to directly export the report ?
I have created rdlc file with name of xyz and while downloading as a Excel file i need name some thing like ABCD , i have used your suggestion code ( ReportViewerControl.ServerReport.DisplayName = “ABCD” ) , but still i am getting XYZ name on downloaded file , could you please help on this , do i need to do some setting on rdlc file .
Can you confirm if you applying code on Page_Load , it won’t work on any of other methods.
II am using:
but I am not getting ReportViewerControl object or ReportViewer object. Any idea?
Can you copy block of your code ?