Ticket Q239231
Visible to All Users

How modify predefined file name on exporting report

created 15 years ago

Hi,
Right now the file name is same as report class name.
Regards,
Krzysztof

Comments (2)
DevExpress Support Team 15 years ago

    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

    K K
    Krzysztof B. @ VT 15 years ago

      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

      Answers approved by DevExpress Support

      created 15 years ago (modified 12 years ago)

      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

        Comments (2)
        K K
        Krzysztof B. @ VT 15 years ago

          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

          DevExpress Support Team 15 years ago

            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

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.