Add blank column, rename column.
[capital-apms-progress.git] / process / report / report.p
blob0c349ad48d06cf2ec8d2a3fa00a213b38df3aaa8
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
2 &ANALYZE-RESUME
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
5 Report:
6 Author:
7 Date:
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 */
19 &ANALYZE-RESUME
22 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
24 /* ******************** Preprocessor Definitions ******************** */
26 &Scoped-define PROCEDURE-TYPE Procedure
30 /* _UIB-PREPROCESSOR-BLOCK-END */
31 &ANALYZE-RESUME
35 /* *********************** Procedure Settings ************************ */
37 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
38 /* Settings for THIS-PROCEDURE
39 Type: Procedure
40 Allow:
41 Frames: 0
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
52 HEIGHT = .05
53 WIDTH = 32.57.
54 /* END WINDOW DEFINITION */
56 &ANALYZE-RESUME
60 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Procedure
61 /* ************************* Included-Libraries *********************** */
63 {inc/method/m-txtrep.i}
65 /* _UIB-CODE-BLOCK-END */
66 &ANALYZE-RESUME
70 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
73 /* *************************** Main Block *************************** */
75 RUN parse-parameters.
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").
81 /* report goes here -
82 e.g pclrep-line( "Helvetica,Point,12,Proportional,Normal", "Some Text"
85 OUTPUT CLOSE.
87 RUN pclrep-finish.
89 /* _UIB-CODE-BLOCK-END */
90 &ANALYZE-RESUME
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 ------------------------------------------------------------------------------*/
101 END PROCEDURE.
103 /* _UIB-CODE-BLOCK-END */
104 &ANALYZE-RESUME
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 */
121 END PROCEDURE.
123 /* _UIB-CODE-BLOCK-END */
124 &ANALYZE-RESUME
127 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE parse-parameters Procedure
128 PROCEDURE parse-parameters :
129 /*------------------------------------------------------------------------------
130 Purpose:
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.
140 END CASE.
142 END.
144 END PROCEDURE.
146 /* _UIB-CODE-BLOCK-END */
147 &ANALYZE-RESUME