When you export a report to excel is there an event that fires?

4 posts, 1 answers
  1. KawaUser
    KawaUser avatar
    57 posts
    Member since:
    Oct 2010

    Posted 06 Dec 2010 Link to this post

    When my report is exported to excel is there an event that fires? I need to add 2 tabs to the excel sheet.
  2. Answer
    Peter
    Admin
    Peter avatar
    1611 posts

    Posted 08 Dec 2010 Link to this post

    Hi KawaUser,

    The Windows Forms Report Viewer has an Export event that you can use for such scenarios. Check out the following code snippet and let us know if you need additional assistance.

    private void reportViewer1_Export(object sender, Telerik.ReportViewer.WinForms.ExportEventArgs args)
    {
        switch (args.RenderingExtension.Name)
        {
            case "XLS":
                (sender as Telerik.ReportViewer.WinForms.ReportViewer).Report = new Report2();
                break;
            case "PDF":
                //do something
                break;
        }
    }

    Regards,
    Peter
    the Telerik team
    Get started with Telerik Reporting with numerous videos and detailed documentation.
  3. DevCraft banner
  4. KawaUser
    KawaUser avatar
    57 posts
    Member since:
    Oct 2010

    Posted 18 May 2011 Link to this post

    Thank you for your previous help, but I have run in to it again. I need to know when the user saves the file. Is there some kind of confirmation that the export or some event gets that lets us know that the file has actually been saved?

    Thank you,
    Chuck
  5. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 25 May 2011 Link to this post

    Hi KawaUser,

    We don't expose an API for such verification. However you can utilize the reporting API to export the report programmatically and manage the save dialog.

    You may find useful Exporting Report Programmatically help article.

    Best wishes,
    Peter
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top