This is a migrated thread and some comments may be shown as answers.

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

3 Answers 323 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
KawaUser
Top achievements
Rank 2
KawaUser asked on 06 Dec 2010, 10:29 PM
When my report is exported to excel is there an event that fires? I need to add 2 tabs to the excel sheet.

3 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 08 Dec 2010, 06:23 PM
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.
0
KawaUser
Top achievements
Rank 2
answered on 18 May 2011, 09:47 PM
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
0
Peter
Telerik team
answered on 25 May 2011, 12:50 PM
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
Tags
General Discussions
Asked by
KawaUser
Top achievements
Rank 2
Answers by
Peter
Telerik team
KawaUser
Top achievements
Rank 2
Share this question
or