TReport: report structure
Organizes report definition and printing processing.
Overview
TReport contains sections, cells, breaks and totals and replaces legacy SetPrint/SetDefault/RptStatus/Cabec. Its constructor receives ID, title, parameters and bAction invoked on printing confirmation. Defining layout does not print records. The community sample separates definition/data processing and uses section Init/PrintLine/Finish. Its SQL and fixed aliases are not copied: real integration needs context, cancellation, cleanup and correct filtering. This block only prepares construction with a caller-supplied action. (Sources: refs. 1–2.)
Commented example
#Include "Protheus.ch"
User Function Ed698()
// Uninvoked block: bPrint must implement real processing.
Local bCreate := {|bPrint| TReport():New("ED698","Example report",,bPrint)}
ConOut(ValType(bCreate))
Return NilCreates block B without a dialog or printing. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Do not treat construction as printing confirmation. Check memory, pagination and release-specific XLSX output behavior.
- 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.