To create a method field
Click the New button on the Catalog of Available Fields dialog. The Add Method Field dialog is then displayed.
In the Method Field list box, select the method whose value you want to change or add. In the image, the pricePlusTax method field has been selected.
This list box displays the full path (from the root collection of the report) of the method to be executed. The list box is similar to the one on the System sheet of the Catalog of Available Fields, which shows Database items. However, the Method Field list box shows only methods with parameters from the view definition, for the current root collection or collections, and all subsequent references and collections.
In the Name text box, enter the name of your method field. The name value can be the same as the field you selected in the previous step, but it must be unique within the method fields of the report.
The Method Parameters table displays the parameter name (for example, type or includeTax) in the first column and parameter type (for example, String or Boolean) in the second column. The fourth column has a Report Param check box, which determines how the value of the method parameter is to be specified in the third column. The fifth column has a Database Field check box, which enables you to specify the database item to be used as the method parameter.
If you check the Report Param check box, the cell in the third column becomes a combo box, enabling you to specify the method parameter by selecting from a list of report parameters of the appropriate type. (Report parameters are defined on the Param sheet of the Catalog of Available Fields.)
Bubble help in the text box portion of the value combo box displays the type and length of the method parameter.
If there are no parameters with a matching type, the check box in the fourth column is disabled. If report parameters of the correct type exist, they are displayed in the drop-down list portion of the combo box, to enable you to select the required parameter value.
If you check the Database Field check box, the cell in the third column becomes a combo box, enabling you to specify the method parameter by selecting from a list of database items that have been used in the report. (If the database item has not been used and is required as a method parameter, you can add it to the report as an invisible field. The database item will then be displayed in the combo box.)
If there are no database items with a matching type, the check box in the fifth column is disabled. If database items of the correct type exist, they are displayed in the drop-down list portion of the combo box, to enable you to select the required database item.
If the Report Param or the Database Field check boxes are not checked, the cell in the third column becomes a text box, enabling you to specify the required method parameter by entering a literal value directly.
Click the Apply button to create your method field with the specified parameter value. Alternatively, click the Close button if you decide not to create a method field.
The new method field is then added to the list of methods with parameters on the Methods sheet of the Catalog of Available Fields.
When you have defined a method field, it is displayed in the catalog list so that you can drag it onto your report on the Designer window in the same manner as other catalog items.