How to change the default PDF filename?

9 posts, 0 answers
  1. Feedback
    Feedback avatar
    15 posts
    Member since:
    May 2007

    Posted 08 Aug 2007 Link to this post

    When a user clicks on the "Export" button of the ReportViewer, he or she can choose to export the report to a PDF file because I made sure to reference the ImageRendering dll in my project.

    How can I change the default filename to which the report will be exported?  I need to change this at run time, based on which report they have run and on which products.

    Is there a way to set this?  Right now, it always exports to "Report.pdf" and that isn't going to work for this project.

    I looked in the documentation, and in this forum, and have come up empty for setting the filename when the ReportViewer is being used (direct export to PDF is covered quite nicely here in the forum, however.)

    Thanks!
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 08 Aug 2007 Link to this post

    Thank you for the nice question, Matthew.

    The default name of the file, when exporting a report, is the name of the report class plus the appropriate extension. As of now, there is not way to override that name at runtime. You can create different report classes with different names that inherit from your original report, and each of them will be exported with its appropriate name.

    We will consider adding this functionality in a future version. There is no workaround I can suggest at the present moment.
     

    Best wishes,
    Rossen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
  4. Joel
    Joel avatar
    166 posts
    Member since:
    Oct 2006

    Posted 24 Sep 2007 Link to this post

    I was curious if the ability to programatically name the pdf file has been added in the Q2 release?  Our standard class naming convention makes for a very odd user experience.  This would be important functionality in the future if it does not exist yet.
  5. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 25 Sep 2007 Link to this post

    Hi Joel,

    To our great regret we didn't got enough time and postponed the feature for the next version, due at the end of the year. Sorry for the delay.
     
     
    Kind regards,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Gary C
    Gary C avatar
    8 posts
    Member since:
    Nov 2008

    Posted 09 Oct 2009 Link to this post

    Hello,

    Has this feature has been implemented in the latest version? (i.e. changing the export file name at runtime). If so, how do you do it?

    Thanks,
    -Gary
  7. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 12 Oct 2009 Link to this post

    Hello Gary,

    You should use the DocumentName property of the report for this purpose.

    Best wishes,
    Steve
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. Dan
    Dan avatar
    4 posts
    Member since:
    Sep 2012

    Posted 28 Feb 2013 Link to this post

    This question is a few years old now.  Is there a solution for this yet?  I just had a customer request the file be named to something other than the class name.
  9. Squall
    Squall avatar
    174 posts
    Member since:
    Feb 2011

    Posted 01 Mar 2013 Link to this post

    Have you tried to set the Report.DocumentName property?
  10. Dan
    Dan avatar
    4 posts
    Member since:
    Sep 2012

    Posted 01 Mar 2013 Link to this post

    Yes.  About 2 minutes after I posted this I found another thread which described how to do this.
Back to Top
DevCraft banner