Hi,
I am trying to find a way to create a custom filename for files that are exported via the XtraReports report toolbar. I have tried all of the suggestions that I could find in other DevExpress support tickets and none of them have worked. The name of the report that I am exporting is "PerformanceXtraReport" and the filenames for the export are always PerformanceXtraReport.pdf (or appropriate extension for the file type selected). The things that I have changed that haven't had an impact on the filename are as follows:
- Updated the ExportOptions.PrintPreviewOptions.DefaultFileName to "Test" through the Properties menu in Visual Studio
- Set this.ExportOptions.PrintPreview.DefaultFileName = "Test"; in the report's initializer in the report file's code-behind file
- Set this.PerformanceReportViewer.Report.ExportOptions.PrintPreview.DefaultFileName = "Test"; (where PerformanceReportViewer is of type XtraReports.Web.ReportViewer) in the Page_Load event for the code-behind for the ascx file that the Report viewer appears on
- Set report.ExportOptions.PrintPreview.DefaultFileName = "Test"; (where report is of type PerformanceXtraReport) when creating an instance of the report and settings it to the PerformanceReportViewer.Report property.
I have done all 4 of these and the file name continues to default to PerformanceXtraReport.pdf when the file is exported using the report's toolbar. I have founds ways that look like they will work using a separate button on the page and using a MemoryStream and the ExportToPdf() method but I would like to continue using the report toolbar so that way of doing it won't work for me.
Any ideas?
Thank you in advance for your help.