Report Object

The most important methods for accessing the tables and variable contents, temporary variables and the evaluation of formulas are provided by the report object.

When accessing variables and fields, always pay attention to the current context. Only those variables and fields that are actually registered in the current context can be accessed.

Report.Variable

Access a List & Label variable and return its value, read only.

Parameter:

String              Determines the name of the variable to be queried

Return value:

String

Example:

Script$('CSharpScript','Report.Variable("LL.CurrentContainer");')

Report.Field

Access a List & Label field and return its value, read only.

Parameter:

String              Defines the name of the field to be queried

Return value:

String

Example:

Script$('CSharpScript', 'Report.Field("Orders.CustomerID");')

Report.Eval

Evaluates a List & Label expression and returns its value, read only.

Parameter:

String              Determines the expression to evaluate

Return value:

String

Example:

Script$('CSharpScript', 'Report.Eval("RGBStr$(12345);')

The SetVar/GetVar designer functions can be used to indirectly pass intermediate results from one script to another during printing. However, the order of the calls (columns) is of course decisive here. See also the SetVar/GetVar documentation in the Designer Manual.

Example calls C#:

var start = Report.GetVar("ResultTmp"); // Get temporary value

var s1 = Report.Variable("LL.CurrentContainer");

var s2 = Report.Field("Orders.CustomerID");

var s3 = s1 + s2 + Report.Eval("RGBStr$(12345)");

Report.SetVar("ResultTmp", s3, false); // Set temporary value

Example calls VBScript:

start = Report.GetVar("ResultTmp")

s1 = Report.Variable("LL.CurrentContainer")

s2 = Report.Field("Orders.CustomerID")

s3 = s1 + s2 + Report.Eval("RGBStr$(54321)")

call Report.SetVar("ResultTmp", s3, false)

Report.SetVar

Sets a virtual List & Label variable.

Parameter:

String              Determines the name of the virtual variable to be set

All                    Determines the value to be stored

Boolean           Determines whether the function should also return the value or whether the result should be an empty string. Default setting: Return (True)

Return value:

All

Example:

Script$('CSharpScript', 'Report.SetVar("ResultTmp", "MyValue", false);')

Report.GetVar

Returns the value of a virtual variable.

Parameter:

String              Determines the name of the virtual variable to be queried

Return value:

All

Example:

Script$('CSharpScript','Report.GetVar("ResultTmp");')