Using the Methods Sheet

The Methods sheet of the Catalog of Available Fields dialog enables you to create method fields.

A method field, or more accurately a method with parameters field, is a special type of database field. The value of a method field depends on the values of its method parameters.

If the view does not include a method with parameters then you will not be able to create a corresponding method field. For more details about including methods with parameters in a view, see "Selecting the Features for Your View", in Chapter 3.

The following image shows the Methods sheet with a method field that has previously been created.

There are no examples of method fields in the Erewhon system, so the following hypothetical example is presented.

Suppose that the price of a retail sale item is not fixed, and that different prices are offered to different clients. For example, there could be a standard price for most clients, and a discount price that is only available to selected clients. The price could also depend on whether tax is included.

Instead of there being a price database field for a sale item (as in the Erewhon system), there could be a pricePlusTax method field that takes two parameters: the price list offered to the client (standard or discount) and whether tax is to be included.

It is important to distinguish between the parameters that are required by a method field (method parameters), and the parameters supplied by a user at the start of report execution (report parameters). For more details about report parameters, see "Using the Param Sheet", earlier in this section.

A method parameter can have its value entered by the report designer, or take its value from a report parameter entered by the report user.

You can treat a method field like any other report field and drag and drop it into a design layout for printing and display.

The following subsections describe how to create and maintain method fields,