Object-Oriented Interface

rptparam

 

The rptparam object is a data member of the pvxreport object interface, delegated to store and manipulate a parameter definition. One object is created for each parameter. The pvxreport GetGroup( ) method can be used to retrieve the object handle for an rptparam object, which allows access to all the object's methods and properties.

rptparam Properties

The following table lists the properties of the rptparam object:

Property

Description

Class$

Name of the class to assign to a parameter.

Data classes have drop control types such as drop boxes, check boxes, multi-lines and queries associated with them that will be applied when using the generic interactive parameter interface.

To override existing settings for Description$, Length$, Default$ and Format$ properties with the class settings, use the SetClass( ) method.

(The Class$ property was added in PxPlus 2021.)

Default$

(Optional) Pre-set value that will automatically be loaded.

An expression can be entered if preceded by an = (equals sign); e.g. =DTE(0:"%Y%Mz%Dz"). Returns the evaluated value.

(The ability to enter an expression was added in PxPlus 2021.)

Description$

Prompt to be displayed in the user interface, which is presented when the report is generated. This should explain to the user what value to enter and its format.

An expression can be entered if preceded by an = (equals sign); e.g. =%DatePrompt$. Returns the evaluated value.

(The ability to enter an expression was added in PxPlus 2021.)

Format$

(Optional) Display format to be applied to input and output values.

An expression can be entered if preceded by an = (equals sign); e.g. =%MyFormat$. Returns the evaluated value.

(The Format$ property was added in PxPlus 2021.)

Length

Maximum length of the value to be entered by the user. Must be a positive number. Automatically synchronized with Length$. Set to 0 if invalid.

An expression can be entered if preceded by an = (equals sign); e.g. =%MaxLength. Returns the evaluated value.

(The ability to enter an expression was added in PxPlus 2021.)

Length$

Same as Length. Set to null if invalid.

An expression can be entered if preceded by an = (equals sign); e.g. =%MaxLength$. Returns the evaluated value.

(The Length$ property was added in PxPlus 2020.)
(The ability to enter an expression was added in PxPlus 2021.)

Library$

Name of the library file containing the definition for this parameter. Can be a simple file name or complete path. Read only. Set using SetLibrary( ) method.

Maximum$

(Optional) Maximum value that can be entered.

An expression can be entered if preceded by an = (equals sign); e.g. =DTE(0:"%Y%Mz%Dz"). Returns the evaluated value.

(The ability to enter an expression was added in PxPlus 2021.)

Minimum$

(Optional) Minimum value that can be entered.

An expression can be entered if preceded by an = (equals sign); e.g. =DTE(0:"%Y%Mz%Dz"). Returns the evaluated value.

(The ability to enter an expression was added in PxPlus 2021.)

Name$

Name of the data variable to store the parameter value - used mainly in formulas and filter definitions. This must start with an alpha character, optionally followed by alphanumeric, period or underscore characters. Maximum 30 characters. Set to null if invalid.

Type$

Single-character code to indicate whether the parameter value is a string or numeric value:

   S - String/text
   N - Numeric/computational

Value$

Current value of the parameter.

rptparam Methods

The following table lists the methods of the rptparam object:

Method

Description

GetClass$( )

Returns the class name.

(The GetClass$( ) method was added in PxPlus 2021.)

GetDefault$( )

Returns the raw Default$ value definition rather than the evaluated value.

(The GetDefault$( ) method was added in PxPlus 2021.)

GetDescription$( )

Returns the raw Description$ definition rather than the evaluated value.

(The GetDescription$( ) method was added in PxPlus 2021.)

GetFormat$( )

Returns the raw Format$ definition rather than the evaluated value.

(The GetFormat$( ) method was added in PxPlus 2021.)

GetLength$( )

Returns the raw Length$ definition rather than the evaluated value.

(The GetLength$( ) method was added in PxPlus 2021.)

GetMaximum$( )

Returns the raw Maximum$ value definition rather than the evaluated value.

(The GetMaximum$( ) method was added in PxPlus 2021.)

GetMinimum$( )

Returns the raw Minimum$ value definition rather than the evaluated value.

(The GetMinimum$( ) method was added in PxPlus 2021.)

SetClass(Class$)

Assigns a class to the parameter and sets the Description$, Length$, Default$ and Format$ properties to use the class settings, overwriting existing values.

(The SetClass(Class$) method was added in PxPlus 2021.)

SetLibrary(LibraryFile$)

Sets the name of the library file containing the definition for this calculated field specified in LibraryFile$. Can be a simple file name or complete path. Returns 1 if successful, 0 if not.

SetParameter(Value$)

SetParameter(
Value)

Sets the value of a parameter.

Value$ may be used to set string or numeric values.
Value may be used to set numeric values.