TRSection, TRCell and TRFunction
Connects report sections, cells and totals.
Overview
TRSection organizes data, TRCell defines a cell and TRFunction binds calculations such as COUNT/SUM to a cell and printing scope. Counting rows differs from summing values. The fragment adapts the community COUNT binding, assuming an existing cell and implemented print cycle. Construction does not establish data processing. For Excel table output, TRSection requires a title and the definition takes precedence over visual changes during printing. (Sources: refs. 1–4.)
Commented example
// Fragment: oSection already contains CODIGO; does not start printing.
Local oTotal := TRFunction():New(oSection:Cell("CODIGO"),,"COUNT")
// Verify update timing and scope within the section cycle.Defines a cell-bound COUNT; no numeric total has been measured. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Test empty data, groups and break scope. Do not sum identifier codes as monetary amounts.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.