Add blank column, rename column.
[capital-apms-progress.git] / process / report / grplistg.p
blobfc879c5e127a6110150f4cbb7e6b291e692a22d5
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
2 &ANALYZE-RESUME
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
5 ------------------------------------------------------------------------*/
7 &IF DEFINED(UIB_IS_RUNNING) &THEN
8 DEF VAR report-options AS CHAR NO-UNDO INITIAL "".
9 &ELSE
10 DEF INPUT PARAMETER report-options AS CHAR NO-UNDO.
11 &ENDIF
13 DEF VAR preview AS LOGI NO-UNDO INIT Yes.
14 DEF VAR by-code AS LOGI NO-UNDO.
15 DEF VAR by-sequence AS LOGI NO-UNDO.
17 DEF VAR user-name AS CHAR NO-UNDO.
18 {inc/username.i "user-name"}
19 DEF VAR timeStamp AS CHAR FORMAT "X(44)" NO-UNDO.
20 timeStamp = STRING( TODAY, "99/99/9999") + ", " + STRING( TIME, "HH:MM:SS") + " for " + user-name.
23 /* $History: GRPLISTG.P $
25 * ***************** Version 5 *****************
26 * User: Andrew Date: 22/12/97 Time: 14:49
27 * Updated in $/PROCESS/REPORT
28 * Should only check in a couple of items - let's see!
30 * ***************** Version 4 *****************
31 * User: Andrew Date: 22/12/97 Time: 9:44
32 * Updated in $/PROCESS/REPORT
33 * Testing new SS version
35 * ***************** Version 3 *****************
36 * User: Andrew Date: 19/12/97 Time: 10:46
37 * Updated in $/PROCESS/REPORT
38 * Sending an update to OZ and to Auckland
40 * ***************** Version 2 *****************
41 * User: Andrew Date: 5/08/97 Time: 14:17
42 * Updated in $/PROCESS/REPORT
44 * ***************** Version 1 *****************
45 * User: Andrew Date: 21/07/97 Time: 0:07
46 * Created in $/PROCESS/REPORT
48 * ***************** Version 2 *****************
49 * User: Tyrone Date: 7/15/97 Time: 10:52a
50 * Updated in $/PROCESS/REPORT
52 * ***************** Version 1 *****************
53 * User: Tyrone Date: 7/10/97 Time: 9:35a
54 * Created in $/PROCESS/REPORT
56 * ***************** Version 5 *****************
57 * User: Andrew Date: 16/06/97 Time: 11:15
58 * Updated in $/PROCESS/REPORT
59 * Back from Auckland
61 * ***************** Version 10 *****************
62 * User: Andrew Date: 11/06/97 Time: 10:24
63 * Updated in $/PROCESS/REPORT
64 * In Auckland
66 * ***************** Version 9 *****************
67 * User: Andrew Date: 28/03/97 Time: 17:27
68 * Updated in $/PROCESS/REPORT
71 /* _UIB-CODE-BLOCK-END */
72 &ANALYZE-RESUME
75 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
77 /* ******************** Preprocessor Definitions ******************** */
79 &Scoped-define PROCEDURE-TYPE Procedure
83 /* _UIB-PREPROCESSOR-BLOCK-END */
84 &ANALYZE-RESUME
88 /* *********************** Procedure Settings ************************ */
90 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
91 /* Settings for THIS-PROCEDURE
92 Type: Procedure
93 Allow:
94 Frames: 0
95 Add Fields to: Neither
96 Other Settings: CODE-ONLY COMPILE
98 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
100 /* ************************* Create Window ************************** */
102 &ANALYZE-SUSPEND _CREATE-WINDOW
103 /* DESIGN Window definition (used by the UIB)
104 CREATE WINDOW Procedure ASSIGN
105 HEIGHT = .07
106 WIDTH = 32.57.
107 /* END WINDOW DEFINITION */
109 &ANALYZE-RESUME
113 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Procedure
114 /* ************************* Included-Libraries *********************** */
116 {inc/method/m-txtrep.i}
118 /* _UIB-CODE-BLOCK-END */
119 &ANALYZE-RESUME
123 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
126 /* *************************** Main Block *************************** */
128 RUN parse-parameters.
130 OUTPUT TO VALUE(txtrep-print-file) KEEP-MESSAGES PAGE-SIZE 0.
132 RUN pclrep-start( preview, "reset,portrait,tm,2,a4,lm,6,courier,cpi,18,lpi,9").
134 RUN account-group-listing.
136 OUTPUT CLOSE.
138 RUN pclrep-finish.
140 /* _UIB-CODE-BLOCK-END */
141 &ANALYZE-RESUME
144 /* ********************** Internal Procedures *********************** */
146 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE account-group-listing Procedure
147 PROCEDURE account-group-listing :
148 /*------------------------------------------------------------------------------
149 Purpose:
150 Parameters: <none>
151 Notes:
152 ------------------------------------------------------------------------------*/
154 IF by-code THEN
155 FOR EACH AccountGroup NO-LOCK:
156 RUN each-account-group.
157 END.
158 ELSE IF by-sequence THEN
159 FOR EACH AccountGroup NO-LOCK
160 BY AccountGroup.SequenceCode:
161 RUN each-account-group.
162 END.
164 END PROCEDURE.
166 /* _UIB-CODE-BLOCK-END */
167 &ANALYZE-RESUME
170 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE each-account-group Procedure
171 PROCEDURE each-account-group :
172 /*------------------------------------------------------------------------------
173 Purpose:
174 Parameters: <none>
175 Notes:
176 ------------------------------------------------------------------------------*/
178 RUN pclrep-line( "courier,Fixed,cpi,18,lpi,9,Normal",
179 SPC( 3 ) +
180 STRING( AccountGroup.SequenceCode, ">9" ) + SPC( 5 ) +
181 STRING( AccountGroup.AccountGroupCode, "X(6)" ) + SPC( 4 ) +
182 STRING( AccountGroup.Name, "X(50)" )
185 END PROCEDURE.
187 /* _UIB-CODE-BLOCK-END */
188 &ANALYZE-RESUME
191 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-page-footer Procedure
192 PROCEDURE inst-page-footer :
193 /*------------------------------------------------------------------------------
194 Purpose: Print any page footer
195 ------------------------------------------------------------------------------*/
197 END PROCEDURE.
199 /* _UIB-CODE-BLOCK-END */
200 &ANALYZE-RESUME
203 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-page-header Procedure
204 PROCEDURE inst-page-header :
205 /*------------------------------------------------------------------------------
206 Purpose: Print any page header
207 ------------------------------------------------------------------------------*/
209 RUN pclrep-line( "univers,Point,7,Proportional,Bold", TimeStamp).
210 RUN pclrep-line( "univers,Point,12,Proportional,Bold",
211 SPC(45) + "Account Group Listing").
212 RUN pclrep-line( "", "").
213 RUN pclrep-line( "Courier,Fixed,cpi,18,lpi,9,Bold",
214 STRING( "Sequence", "X(8)" ) + SPC( 2 ) +
215 STRING( "Code", "X(6)" ) + SPC( 4 ) +
216 STRING( "Group Name", "X(50)" )
218 RUN pclrep-line( "", "").
220 END PROCEDURE.
222 /* _UIB-CODE-BLOCK-END */
223 &ANALYZE-RESUME
226 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE parse-parameters Procedure
227 PROCEDURE parse-parameters :
228 /*------------------------------------------------------------------------------
229 Purpose:
230 Parameters: <none>
231 Notes:
232 ------------------------------------------------------------------------------*/
234 DEF VAR i AS INT NO-UNDO.
235 DEF VAR token AS CHAR NO-UNDO.
237 DO i = 1 TO NUM-ENTRIES( report-options, "~n" ):
238 token = ENTRY( i, report-options, "~n" ).
240 CASE ENTRY( 1, token ):
241 WHEN "Preview" THEN preview = ENTRY( 2, token ) = "Yes".
242 WHEN "Sort" THEN
243 IF ENTRY( 2, token ) = "Code" THEN by-code = Yes. ELSE
244 IF ENTRY( 2, token ) = "Sequence" THEN by-sequence = Yes.
245 END CASE.
247 END.
249 END PROCEDURE.
251 /* _UIB-CODE-BLOCK-END */
252 &ANALYZE-RESUME