MESCIUS.ActiveReports.Viewer.Common Assembly / GrapeCity.Viewer.Common.Model.Interactivity Namespace / ApplyParametersAction Class
Members

ApplyParametersAction Class

Create a simple Windows Forms application that loads a report containing ApplyParameters (see Load Reports on how to create a Windows Forms application and preview a report in the Viewer).

Add an Action event handler for the Viewer control and make the handler method look like the code in the example below.

C#
Copy Code
private void Viewer1_Action(object sender, GrapeCity.ActiveReports.Viewer.Win.Viewer.ActionEventArgs e)
{
    if (e.Action is GrapeCity.Viewer.Common.Model.Interactivity.ApplyParametersAction action)
    {
        foreach (var parameter in action.Parameters)
        {
            string values = string.Join(Environment.NewLine + "  ", parameter.Values.Select(value => value?.ToString()));
            MessageBox.Show($"Parameter:{Environment.NewLine}  {parameter.Name}{Environment.NewLine}Values:{Environment.NewLine}  {values}");
        }
    }
}
VB.NET
Copy Code
Private Sub Viewer1_Action(sender As Object, e As GrapeCity.ActiveReports.Viewer.Win.Viewer.ActionEventArgs) Handles Viewer1.Action
    Dim action As GrapeCity.Viewer.Common.Model.Interactivity.ApplyParametersAction
    action = e.Action
    If action IsNot Nothing Then
        For Each parameter In action.Parameters
            Dim values As String
            values = String.Join(Environment.NewLine + "  ", parameter.Values.Select(Function(value) value?.ToString()))
            MessageBox.Show($"Parameter:{Environment.NewLine}  {parameter.Name}{Environment.NewLine}Values:{Environment.NewLine}  {values}")
        Next parameter
    End If
End Sub
Object Model
ApplyParametersAction Class
Syntax
'Declaration
 
Public Class ApplyParametersAction 
   Implements IAction 
 
Remarks
This action is useful for dynamically modifying the report's data or appearance based on user input or other criteria. Parameters can control various aspects of the report, such as filtering data, changing styles, or setting values used in calculations.
Inheritance Hierarchy

System.Object
   GrapeCity.Viewer.Common.Model.Interactivity.ApplyParametersAction

See Also