Progress® Telerik® Reporting R3 2017

ReportViewerExportBegin Event

Occurs when the report in the viewer control starts exporting.

Namespace:  Telerik.ReportViewer.Wpf
Assembly:  Telerik.ReportViewer.Wpf (in Telerik.ReportViewer.Wpf.dll)

Syntax

public event ExportBeginEventHandler ExportBegin

Value

Type: Telerik.ReportViewer.CommonExportBeginEventHandler

Examples

This example illustrates how to wire the ExportBegin event, cancel it if needed and perform some logic based on the export format.
void reportViewer1_ExportBegin(object sender, Telerik.ReportViewer.Common.ExportBeginEventArgs args)
{
    if (true) // some logic here
    {
        // Cancel is false by default
        args.Cancel = true;
    }

    switch (args.Format)
    {
        case "Excel":
            // do something
            break;
        case "PDF":
            // do something
            break;
    }
}

See Also