Reports for WinForms | ComponentOne
C1.C1Report.4 Assembly / C1.C1Report Namespace / C1Report Class / AddScriptObject Method / AddScriptObject(String,Object,Boolean) Method
Name of the new object (case-insensitive).
Value of the new object.
Whether to add the object to the script context of all subreports as well.

In This Topic
    AddScriptObject(String,Object,Boolean) Method
    In This Topic
    Adds an object to the report's script context.
    Syntax
    'Declaration
     
    Public Overloads Sub AddScriptObject( _
       ByVal name As String, _
       ByVal value As Object, _
       ByVal addToSubreports As Boolean _
    ) 
    public void AddScriptObject( 
       string name,
       object value,
       bool addToSubreports
    )

    Parameters

    name
    Name of the new object (case-insensitive).
    value
    Value of the new object.
    addToSubreports
    Whether to add the object to the script context of all subreports as well.
    Remarks

    This method allows you to add custom objects to the context of the C1Report script interpreter.

    The script interpreter context is cleared whenever a report starts rendering, so this method should always be called from the StartReport event handler.

    See Also