How do I add Calculated Controls to my forms and reports?

From Apache OpenOffice Wiki
Jump to: navigation, search


How do I add Calculated Controls to my forms and reports?


Controls in Base forms and reports cannot be used to perform calculations. There are two methods available to get a calculated result on a form or report.

Using a query
Modify the underlying data source of the form or report to perform the calculation for each record and return the result as a (calculated) field.
Using a macro
If you need your control to update as data is entered into a form, you will need to write a small macro to perform the calculation and assign it to an appropriate event on one of the data entry controls (e.g. the Text modified event).
Personal tools