Hi,
Right now the file name is same as report class name.
Regards,
Krzysztof
How modify predefined file name on exporting report
Answers approved by DevExpress Support
Krzysztof,
Thank you for the feedback. Please refer to the How can I set a pdf file name when I use the writetopdf method thread.
It should help you to accomplish this task. Please also track our progress over the Web - Add a capability to define a default file name when exporting a report using the Web ReportToolbar suggestion.
Thanks,
Andrew
Hello Andrew,
In my opinion mentioned issues can't really help me bacause thres an additional button used but in my case report toolbar buttons are used to generate the file. As I see there isn't any event for the toolbar buttons ov even the toolbar I could use to rewrite the response. What should I do to change generated report file name?
Regards,
Krzysztof
Hi Krzysztof,
Actually, it's not necessary to handle the built-in SaveToDisk button's Click event for this purpose. Just update the report's name (see the XtraReport.Name property) using the Page_Load event handler, and then link the report to the ReportViewer. Please review the sample project posted in the "report toolbar button click event", where a similar scenario is discussed, and let me know whether this helps.
Thanks,
Alex
Hi Krzysztof,
Yes it's possible. You simply need to set the XtraReport.ExportOptions.PrintPreview.DefaultFileName property.
Please try this solution, and let us know the results.
Thanks,
Andrew
Hi,
I tried your solution but it didn't worked. I use reports in web environment. When I click on ReportToolbar export button I always get file with name equal to report's class name.
Any ideas what could be wrong?
Regards,
Krzysztof