Progress® Telerik® Reporting R2 2017

ReportViewerBaseInteractiveActionExecuting Event

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

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

Syntax

public event InteractiveActionExecutingEventHandler InteractiveActionExecuting

Value

Type: Telerik.ReportViewer.CommonInteractiveActionExecutingEventHandler

Examples

This example illustrates how to wire the event and use the event arguments.
void reportViewer1_CustomInteractiveActionExecuting(object sender, Telerik.ReportViewer.Common.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.Common.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", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != System.Windows.Forms.DialogResult.Yes;
        }
    }
}

See Also