I am having a problem to find how to change the name of the file that is going to be exported from the Report Viewer.
I have been looking for a way of setting programaticaly this name, for example despite of my RDLC Report, i would like to set the name when is exported to "Report.pdf" or "Report.xls".
When i export file it shows just ".pdf" or ".xls", file name is missing here's my piece of code .
ReportViewer2.LocalReport.DataSources.Clear();
ReportViewer2.LocalReport.DataSources.Add(rdData);
ReportViewer2.LocalReport.DataSources.Add(rdChart);
ReportViewer2.LocalReport.EnableExternalImages = true;
ReportViewer2.LocalReport.DisplayName ="MyReport";
ReportViewer2.LocalReport.ReportPath = Server.MapPath("Reports/rptSystemUsage.rdlc");
ReportViewer2.LocalReport.SetParameters(Parameters);
ReportViewer2.LocalReport.Refresh();
This issue was caused by an
UpdatePanel
. Moving theReportViewer
outside of the update panel resolved the problem.