# rptparam

> Source: https://manual.pvxplus.com/report-writer/object-oriented-interface/rptparam/overview

The **rptparam** object is a data member of the **[pvxreport](https://manual.pvxplus.com/report-writer/object-oriented-interface/pvxreport/overview)** 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.<br>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.<br>To override existing settings for **Description$**, **Length$**, **Default$** and **Format$** properties with the class settings, use the **[SetClass( )](https://manual.pvxplus.com/report-writer/object-oriented-interface/rptparam/overview#methods)** method.<br>*(The Class$ property was added in PxPlus 2021.)* |
| **Default$** | ***(Optional)*** Pre-set value that will automatically be loaded.<br>An expression can be entered if preceded by an **=** *(equals sign)*; e.g. =DTE(0:"%Y%Mz%Dz"). Returns the evaluated value.<br>*(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.<br>An expression can be entered if preceded by an **=** *(equals sign)*; e.g. =%DatePrompt$. Returns the evaluated value.<br>*(The ability to enter an expression was added in PxPlus 2021.)* |
| **Format$** | ***(Optional)*** Display format to be applied to input and output values.<br>An expression can be entered if preceded by an **=** *(equals sign)*; e.g. =%MyFormat$. Returns the evaluated value.<br>*(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.<br>An expression can be entered if preceded by an **=** *(equals sign)*; e.g. =%MaxLength. Returns the evaluated value.<br>*(The ability to enter an expression was added in PxPlus 2021.)* |
| **Length$** | Same as **Length**. Set to null if invalid.<br>An expression can be entered if preceded by an **=** *(equals sign)*; e.g. =%MaxLength$. Returns the evaluated value.<br>*(The Length$ property was added in PxPlus 2020.)  <br>(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( )](https://manual.pvxplus.com/report-writer/object-oriented-interface/rptparam/overview#methods)** method. |
| **Maximum$** | ***(Optional)*** Maximum value that can be entered.<br>An expression can be entered if preceded by an **=** *(equals sign)*; e.g. =DTE(0:"%Y%Mz%Dz"). Returns the evaluated value.<br>*(The ability to enter an expression was added in PxPlus 2021.)* |
| **Minimum$** | ***(Optional)*** Minimum value that can be entered.<br>An expression can be entered if preceded by an = (equals sign); e.g. =DTE(0:"%Y%Mz%Dz"). Returns the evaluated value.<br>*(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:<br>**S** - String/text  <br> **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.<br>*(The GetClass$( ) method was added in PxPlus 2021.)* |
| **GetDefault$( )** | Returns the raw **Default$** value definition rather than the evaluated value.<br>*(The GetDefault$( ) method was added in PxPlus 2021.)* |
| **GetDescription$( )** | Returns the raw **Description$** definition rather than the evaluated value.<br>*(The GetDescription$( ) method was added in PxPlus 2021.)* |
| **GetFormat$( )** | Returns the raw **Format$** definition rather than the evaluated value.<br>*(The GetFormat$( ) method was added in PxPlus 2021.)* |
| **GetLength$( )** | Returns the raw **Length$** definition rather than the evaluated value.<br>*(The GetLength$( ) method was added in PxPlus 2021.)* |
| **GetMaximum$( )** | Returns the raw **Maximum$** value definition rather than the evaluated value.<br>*(The GetMaximum$( ) method was added in PxPlus 2021.)* |
| **GetMinimum$( )** | Returns the raw **Minimum$** value definition rather than the evaluated value.<br>*(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.<br>*(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$*)   <br>  <br>SetParameter(*Value*) | Sets the value of a parameter.  <br>  <br>*Value$* may be used to set string or numeric values.  <br>*Value* may be used to set numeric values. |
