Progress® Telerik® Reporting R3 2017

ReportViewerInteractiveActionExecuting Event

Occurs when an action is being executed. Execution can be canceled.

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

Syntax

public event InteractiveActionExecutingEventHandler InteractiveActionExecuting

Value

Type: Telerik.ReportViewer.WpfInteractiveActionExecutingEventHandler

Examples

This example illustrates how to wire the event and use the event arguments.
void reportViewer1_CustomInteractiveActionExecuting(object sender, Telerik.ReportViewer.Wpf.InteractiveActionCancelEventArgs args)
{
    var strB = new System.Text.StringBuilder();
    strB.AppendLine("ReportItem name: " + args.Action.ReportItemName);

    var customAction = args.Action as Telerik.Reporting.Processing.CustomAction;
    if (null != customAction)
    {
        foreach (var p in customAction.Parameters)
        {
            strB.AppendLine(string.Format("Parameter \"{0}\" value: {1}", p.Key, p.Value));
        }
    }

    strB.AppendLine(string.Format("Mouse cursor position: {0}; Item bounds: {1}", args.CursorPos, args.Bounds));

    MessageBox.Show(strB.ToString());
}
void reportViewer1_InteractiveActionExecuting(object sender, Telerik.ReportViewer.Wpf.InteractiveActionCancelEventArgs args)
{
    var navigateToUrlAction = args.Action as Telerik.Reporting.Processing.NavigateToUrlAction;
    if (null != navigateToUrlAction)
    {
        if (!navigateToUrlAction.Url.StartsWith("https"))
        {
            args.Cancel = MessageBox.Show("You are about to navigate to a non-secure page. Continue?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) != MessageBoxResult.Yes;
        }
    }
}

See Also