1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
8 ------------------------------------------------------------------------*/
10 DEF INPUT PARAMETER report-options
AS CHAR NO-UNDO.
12 DEF VAR preview
AS LOGI
NO-UNDO INIT Yes.
13 DEF VAR user-name
AS CHAR NO-UNDO.
14 {inc
/username.i
"user-name"}
15 DEF VAR timeStamp
AS CHAR FORMAT "X(44)" NO-UNDO.
16 timeStamp
= STRING( TODAY, "99/99/9999") + ", " + STRING( TIME, "HH:MM:SS") + " for " + user-name.
18 /* _UIB-CODE-BLOCK-END
*/
22 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
24 /* ******************** Preprocessor Definitions
******************** */
26 &Scoped-define PROCEDURE-TYPE Procedure
30 /* _UIB-PREPROCESSOR-BLOCK-END
*/
35 /* *********************** Procedure Settings
************************ */
37 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
38 /* Settings for
THIS-PROCEDURE
42 Add Fields to
: Neither
43 Other Settings
: CODE-ONLY
COMPILE
45 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
47 /* ************************* Create Window
************************** */
49 &ANALYZE-SUSPEND _CREATE-WINDOW
50 /* DESIGN Window definition
(used by the UIB
)
51 CREATE WINDOW Procedure
ASSIGN
54 /* END WINDOW DEFINITION
*/
60 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Procedure
61 /* ************************* Included-Libraries
*********************** */
63 {inc
/method
/m-txtrep.i
}
65 /* _UIB-CODE-BLOCK-END
*/
70 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
73 /* *************************** Main Block
*************************** */
77 OUTPUT TO VALUE(txtrep-print-file
) KEEP-MESSAGES PAGE-SIZE 0.
79 RUN pclrep-start
( preview
, "reset,portrait,tm,2,a4,lm,6,courier,cpi,18,lpi,9").
82 e.g pclrep-line
( "Helvetica,Point,12,Proportional,Normal", "Some Text"
89 /* _UIB-CODE-BLOCK-END
*/
93 /* ********************** Internal Procedures
*********************** */
95 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-page-footer Procedure
96 PROCEDURE inst-page-footer
:
97 /*------------------------------------------------------------------------------
98 Purpose
: Print any page footer
99 ------------------------------------------------------------------------------*/
103 /* _UIB-CODE-BLOCK-END
*/
107 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-page-header Procedure
108 PROCEDURE inst-page-header
:
109 /*------------------------------------------------------------------------------
110 Purpose
: Print any page header
111 ------------------------------------------------------------------------------*/
113 RUN pclrep-line
( "univers,Point,7,bold,Proportional", TimeStamp
).
114 RUN pclrep-line
( "univers,Point,12,bold,Proportional",
115 SPC
(45) + "Report Header - {&FILE-NAME}"
117 RUN pclrep-line
( "", "" ).
119 /* Put any column headers here
*/
123 /* _UIB-CODE-BLOCK-END
*/
127 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE parse-parameters Procedure
128 PROCEDURE parse-parameters
:
129 /*------------------------------------------------------------------------------
131 ------------------------------------------------------------------------------*/
132 DEF VAR token
AS CHAR NO-UNDO.
133 DEF VAR i
AS INT NO-UNDO.
135 DO i
= 1 TO NUM-ENTRIES( report-options
, "~n" ):
136 token
= ENTRY( i
, report-options
, "~n" ).
138 CASE ENTRY( 1, token
):
139 WHEN "Preview" THEN preview
= Yes.
146 /* _UIB-CODE-BLOCK-END
*/