1

Is there a way to change the default name of an SSRS export file to use current date?

by default when exporting to csv, excel, pdf, etc. the default name of report is the name of the report file (filename.rdl)

so when exporting to excel the default name is "filename.xlsx" how can I do it so it will export with current date or other parameter from the report?

this process is done manually by the user for exporting the file, so I need to do it without data drive subscription or similar, it should be a parameter to set on the report builder I believe.

Baldie47
  • 1,148
  • 5
  • 16
  • 45
  • You cannot do this using the default web portal (report manager in 2008). there are lots of question on so about this very subject but without building something yourself it's not possible. – Alan Schofield Apr 28 '20 at 10:18
  • I'm using microsoft report builder, can this be done with it? – Baldie47 Apr 28 '20 at 10:40
  • I'm 99.9% sure that you cannot do this. Report Builder is for designing and deploying reports to a server, it's not meant to be an end user tool. – Alan Schofield Apr 28 '20 at 10:44
  • I mean, I'm using it for setting up from my side the report builder, the end user will use the web portal for it, what I'm looking is that when they do "export" to save as excel for example, that the default report name to be different than the report filename as it is now. it this clear? – Baldie47 Apr 28 '20 at 10:56
  • As I said, you cannot do this . Is this clear? – Alan Schofield Apr 28 '20 at 10:57
  • got it, (also by your response I think my last comment might have sounded harsh, I meant to say that maybe I wasn't explaining myself properly, I apologize if I sounded diminishing or something, English is not my first language and I thought I might be laying my issue poorly) – Baldie47 Apr 28 '20 at 11:16
  • No problem, it's been a long day.. :) – Alan Schofield Apr 28 '20 at 11:29

1 Answers1

1

Yes. By default, the name of the report will be the name of the RDL file. However, you can change the name of the report, and thus, the name of the exported file by setting the DisplayName property of the ReportViewer.LocalReport.DisplayName.

this.ReportViewer1.LocalReport.DisplayName = $"My Report {DateTime.Now.ToString("MMM-dd-yyyy")}";
Juls
  • 658
  • 6
  • 15