Variables, Fields and Expressions

 

Information such as a return address line on an address label or a heading over a list can be entered directly into the project as "fixed text". Fixed text is printed exactly as it is held in the project.

Alternatively, this information can be taken over dynamically from a higher-level program. Such information is entered into the projects as "variables" or "fields".

Fields are the data that changes for each line of a table. Variables remain the same throughout the page. For example, you might choose the TELEPHONE field for the contents of a column of a table. The different telephone numbers for the data records in the database are printed in this column. In other words, variables and fields are placeholders.

With these two kinds of information, attractive projects can already be designed that are adequate for many purposes. However, the Designer offers much more. With the aid of formulas and expressions, the information held in variables and fixed text can be joined or modified in almost any conceivable way. The "formulas" and "expressions" make this possible. In formulas and expressions, fixed text and variables can be used in "functions" and joined by "operators".

For example, with projects for printing address labels, you can use an expression to automatically add the text "PO Box" to a PO Box number held in a variable called POBOX. In this way, not just the number alone will be printed on the label but something like "PO Box 111111" instead.

Or, consider this: The net price of an article is held in a variable called PRICE. However, you want to print the price including VAT in your list. A formula that calculates the VAT from the net price and then adds it on will help you here. The gross price will then be printed.

 

 

See also:

buttonVariables-/Field-List

buttonThe Elements of an Expression

buttonWorking With Functions

buttonWorking With Operators