cTituloReport title.
AdvPL GuideCabec( <cTitulo>, <cCabec1>, <cCabec2>, <cPrograma>, <cTamanho>, [nFormato], [uPar7], [lPerg], [cLogo] ) --> nLinEmits a header within a prepared legacy-report workflow.
Cabec belongs to legacy printing and returns a line number. The historical page requires a title, two heading lines, program and P/M/G size; optional positions cover format, a reserved slot, questions and a BMP logo. The example is a fragment for an already configured test output: it does not prepare printer, spool, pagination or report closure. Nil preserves the reserved seventh slot; .F. explicitly disables printing questions rather than relying on MV_IMPSX1. The returned line is not a printed-record count. (TOTVS, n.d., ref. 1)
Cabec( <cTitulo>, <cCabec1>, <cCabec2>, <cPrograma>, <cTamanho>, [nFormato], [uPar7], [lPerg], [cLogo] ) --> nLincTituloReport title.
cCabec1First heading line.
cCabec2Second heading line.
cProgramaProgram identifier.
cTamanhoP, M or G according to format.
nFormatoPrint format; 15 in the example.
uPar7Reserved; keep Nil.
lPergPrint questions; if omitted checks MV_IMPSX1.
cLogoBMP logo name in the supported workflow.
Line number returned by the printing workflow.
#Include "Protheus.ch"
User Function EdCabec()
Local nLine
// Only within a legacy workflow with test output prepared.
nLine := Cabec("Editorial summary", "Code Description", "", "EDCAB", "M", 15, Nil, .F.)
ConOut(cValToChar(nLine))
Return NilProposes emitting the header and recording the line; without a prepared printing workflow the example is not self-contained. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.