Skip to content

Formula Property

Description

Excel-like calculations (i.e., sum of all rows) to be performed and displayed in the item's caption.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property Formula() As String

Remarks

Formula support for GridRecordItem.

If presented, the item caption will show the results of the calculations based on the given formula.

Examples

  • SUM(R2C3:R8C4) - given range
  • SUM(R*C3:R*C4) - means all rows (parent rows only in case of hierarchy)
  • SUM(R2C*:R8C*) - means all columns
  • SUM(R*C*:R*C*) - means all
    (given item always excluded from the loop - no circular references)

Similar for child records:

  • SUMSUB(R2C3:R8C4) - given range for children
  • SUMSUB(R*C3:R*C4) - means all child rows
  • SUMSUB(R2C*:R8C*) - means all columns
  • SUMSUB(R*C*:R*C*) - means all

So, the parent item can show subtotal, and the bottom item can show total by all.

If the user is doing data entry at runtime in an interactive way, they will need to press F5 to call ReCalc at the end to see the results.

You can call ReCalc at any time to re-calculate the values in the cells.

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.