Skip to end of metadata
Go to start of metadata

It's possible to have total fields that are moved along with the columns when using the "movable columns" feature of a subfile grid.  This is done by adding output fields for your totals, and putting them just under the grid, beneath the appropriate column.  Then, you must set the "id" property of the total field to be the same as the "id" for the subfile field with a suffix of "_total" (without quotes).

For example, consider this subfile:

The TotSales and TotRefunds fields are output fields that are not in the subfile, but are placed beneath the columns that they pertain to.   To make them move along with the columns you should:

  1. Click on the Grid widget, and change the movable columns property to true.
  2. Click on the ORAMOUNT field, and set the id property to Amount (you can use any name you like here, but you'll need to know what it is in step 4.)
  3. Click on the ORREFUND field, and set the id property to Refund (you can use any name you like here, but you'll need to know what it is in step 5.)
  4. Click on the TotSales field and set the id property to Amount_total.  This must be exactly the same (including upper/lower case letters) as the column it corresponds to (Amount, in this example) with _total as a suffix.
  5. Click on the TotRefunds field and set the id property to Refund_total. This must be exactly the same (including upper/lower case letters) as the column it corresponds to (Refund, in this example) with _total as a suffix

Now save and recompile your display file. Also add the calculation for TotSales and TotRefunds to the RPG program, if necessary.

Profound UI will look for fields with the _total suffix, and will automatically move them along with their corresponding columns.  Fields are moved by temporarily adjusting the "left" property by the same amount as was needed to move the subfile column.

Labels
  • No labels