Created
September 22, 2020 22:33
-
-
Save CarlTBarnes/cd99310728b490cf4e085d8c4cccd2c6 to your computer and use it in GitHub Desktop.
ReportPrint() procedure Prints Details while logging to OutputDebugString. Can also add STRING to printed BAND to Identify it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!Add local ReportPrint() | |
!Define: DbgString BYTE | |
! | |
!Change PRINT(Rpt:Detail) to ReportPrint(?Detail,'Rpt:Detail') | |
!If desired set DbgString=1 and each Band gets a String Label 'Rpt:Detail' | |
MAP | |
ReportPrint PROCEDURE(LONG BandFEQ, STRING BandName) | |
END | |
DbgString BYTE | |
!Example of usage | |
ReportPrint(?StubFooter,'RPT:StubFooter') ! PRINT(RPT:StubFooter) | |
ReportPrint PROCEDURE(LONG BandFEQ, STRING BandName) | |
!Change PRINT(Rpt:Band) to ReportPrint(?BandUse,'Rpt:Band') | |
DbFeq LONG | |
DbgString EQUATE(0) ! | |
CODE | |
IF BandFEQ=?StubHeaderTOP THEN DB('#{40} ' & MST:EmpNo &' '& MST:LastFirstMiddleName & '#{20}') . | |
DB('ReportPrint( ' & BandName & ' ) ' & | | |
' Height=' & REPORT$(BandFEQ){PROP:Height} & | | |
' YPos=' & REPORT$(BandFEQ){PROP:Ypos} & | | |
' VertPos=' & VerticalPosition & | | |
' Absolute=' & REPORT$(BandFEQ){prop:absolute}& | | |
'') | |
IF DbgString THEN !Put name in STRING on DETAIL so can see each Band | |
SETTARGET(REPORT) | |
DbFeq=CREATE(0,CREATE:string,BandFEQ) | |
IF DbFeq THEN | |
SETPOSITION(DbFeq,0,0) | |
DbFeq{PROP:Text}=BandName | |
DbFeq{prop:FontSize}=8 | |
UNHIDE(DbFeq) | |
END | |
END | |
PRINT(REPORT, BandFEQ) | |
IF DbgString AND DbFeq THEN DESTROY(DbFeq). | |
SETTARGET() | |
RETURN | |
!FYI you'll need a DB() PROCEDURE that calls OutputDebugString | |
!see my DebugOutput.clw in https://gist.github.com/CarlTBarnes/d3c7a3779b094f0ed48186d04a9b45e6 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment