У меня возникла проблема, как изменить имя файла, который будет экспортироваться из средства просмотра отчетов.
Я искал способ программно установить это имя, например, несмотря на мой отчет RDLC, я хотел бы установить имя при экспорте в «Report.pdf» или «Report.xls».
Когда я экспортирую файл, он показывает только «.pdf» или «.xls», имя файла отсутствует, вот мой фрагмент кода.
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();