Baanboard.com

Go Back   Baanboard.com

User login

Frontpage Sponsor

Main

Poll
Would you like to see a separate forum on Baanboard for the ION product?
No
14%
Yes
86%
Total votes: 80

Baanboard at LinkedIn


Reference Content

 
display.total.fields()
By patvdv at 26 Feb 2008 - 21:57

display.total.fields()

Syntax

void display.total.fields( string fieldname1, value1
  [, string fieldname2, value2 ] ... )

Description

When a total line is included in a form, this function displays total values for specified fields in the grid. The function takes one or more pairs of arguments. In each pair, the first argument is the field name; the second argument is the total value for that field.

The fields must be defined on the form as multioccurrence form fields. They must also be declared in the UI script. Alternately, the fields can be table fields.

To add a total line to a grid, add the following code to the UI script:

 before.program:
     fattr.total.line = true

Then for every update that effects the total fields, call display.total.fields() to display the new totals.

The total line can display an enum value. To do this, the description of the enum must be passed using enum.descr$() . For example:

 display.total.fields( "tffbs.dbcr", enum.descr$( "tfgld.dbcr", tfgld.dbcr.debit ) )

Notes

Total fields are always read-only. They cannot be disabled or enabled.

Total fields have the same display properties as the fields above them.

If a field specified by the function is an array field, the total value is displayed in the first field of the array. Subsequent fields in the array cannot be addressed by the function.

Context

4GL library function.

Example

 before.program:
  fattr.total.line = true

 choice.first.set:
 after.choice:
  display.total.fields( "whwmd000.amnt1", tot_1, "whwmd000.amnt2", tot_2 )

Related topics



0
No votes yet


All times are GMT +2. The time now is 05:40.


©2001-2013 - Baanboard.com - Baanforums.com