Really, this should be it, for the passing income.
[capital-apms-progress.git] / vwr / mnt / v-statmt.w
blob090a937bee3344f1d6791e56df614868f350c3de
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI
2 &ANALYZE-RESUME
3 /* Connected Databases
4 ttpl PROGRESS
5 */
6 &Scoped-define WINDOW-NAME CURRENT-WINDOW
7 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS V-table-Win
8 /*------------------------------------------------------------------------
9 File:
10 Description:
11 ------------------------------------------------------------------------*/
12 CREATE WIDGET-POOL.
13 /* *************************** Definitions ************************** */
15 DEF VAR loc_Account LIKE BankAccount.BankAccountCode NO-UNDO.
16 DEF VAR loc_Lease LIKE TenancyLease.TenancyLeaseCode NO-UNDO.
18 &SCOPED-DEFINE REPORT-ID "Statement of Account"
20 DEF VAR tenant-clause AS CHAR NO-UNDO.
21 DEF VAR month-clause AS CHAR NO-UNDO.
22 DEF VAR item-clause AS CHAR NO-UNDO.
24 {inc/ofc-this.i}
26 /* _UIB-CODE-BLOCK-END */
27 &ANALYZE-RESUME
30 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
32 /* ******************** Preprocessor Definitions ******************** */
34 &Scoped-define PROCEDURE-TYPE SmartViewer
36 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
38 /* Name of first Frame and/or Browse and/or first Query */
39 &Scoped-define FRAME-NAME F-Main
41 /* External Tables */
42 &Scoped-define EXTERNAL-TABLES RP
43 &Scoped-define FIRST-EXTERNAL-TABLE RP
46 /* Need to scope the external tables to this procedure */
47 DEFINE QUERY external_tables FOR RP.
48 /* Standard List Definitions */
49 &Scoped-Define ENABLED-FIELDS RP.Char1 RP.Log3 RP.Log2 RP.Log1 RP.Log4 ~
50 RP.Int2 RP.Int1 RP.Char2
51 &Scoped-define FIELD-PAIRS~
52 ~{&FP1}Int2 ~{&FP2}Int2 ~{&FP3}~
53 ~{&FP1}Int1 ~{&FP2}Int1 ~{&FP3}
54 &Scoped-define ENABLED-TABLES RP
55 &Scoped-define FIRST-ENABLED-TABLE RP
56 &Scoped-Define ENABLED-OBJECTS RECT-23 cmb_startmonth cmb_endmonth ~
57 btn_print
58 &Scoped-Define DISPLAYED-FIELDS RP.Char1 RP.Log3 RP.Log2 RP.Log1 RP.Log4 ~
59 RP.Int2 RP.Int1 RP.Char2
60 &Scoped-Define DISPLAYED-OBJECTS fil_Tenant fil_Property cmb_startmonth ~
61 cmb_endmonth
63 /* Custom List Definitions */
64 /* ADM-CREATE-FIELDS,ADM-ASSIGN-FIELDS,List-3,List-4,List-5,List-6 */
66 /* _UIB-PREPROCESSOR-BLOCK-END */
67 &ANALYZE-RESUME
71 /* *********************** Control Definitions ********************** */
74 /* Definitions of the field level widgets */
75 DEFINE BUTTON btn_print
76 LABEL "&OK"
77 SIZE 10.29 BY 1
78 FONT 9.
80 DEFINE VARIABLE cmb_endmonth AS CHARACTER FORMAT "X(30)" INITIAL "0"
81 LABEL "To"
82 VIEW-AS COMBO-BOX INNER-LINES 6
83 LIST-ITEMS "",""
84 SIZE 18.57 BY 1
85 FONT 10.
87 DEFINE VARIABLE cmb_startmonth AS CHARACTER FORMAT "X(30)" INITIAL "0"
88 LABEL "From"
89 VIEW-AS COMBO-BOX INNER-LINES 6
90 LIST-ITEMS "",""
91 SIZE 18.57 BY 1
92 FONT 10.
94 DEFINE VARIABLE fil_Property AS CHARACTER FORMAT "X(256)":U
95 VIEW-AS FILL-IN
96 SIZE 35 BY 1
97 FONT 10 NO-UNDO.
99 DEFINE VARIABLE fil_Tenant AS CHARACTER FORMAT "X(256)":U
100 VIEW-AS FILL-IN
101 SIZE 46 BY 1
102 FONT 10 NO-UNDO.
104 DEFINE RECTANGLE RECT-23
105 EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
106 SIZE 66.29 BY 10.
109 /* ************************ Frame Definitions *********************** */
111 DEFINE FRAME F-Main
112 RP.Char1 AT ROW 1.2 COL 2 NO-LABEL
113 VIEW-AS RADIO-SET VERTICAL
114 RADIO-BUTTONS
115 "Include All Tenants", "All":U,
116 "Single Tenant", "Tenant":U,
117 "Tenants of a particular property", "Property":U
118 SIZE 24 BY 2.4
119 FONT 10
120 RP.Log3 AT ROW 1.2 COL 40.43 HELP
122 LABEL "Summarise Part-Closed Groups"
123 VIEW-AS TOGGLE-BOX
124 SIZE 24.57 BY .8
125 RP.Log2 AT ROW 2 COL 40.43
126 LABEL "Active Tenants only"
127 VIEW-AS TOGGLE-BOX
128 SIZE 16.57 BY .8
129 FONT 10
130 RP.Log1 AT ROW 2.8 COL 40.43
131 LABEL "Open items only"
132 VIEW-AS TOGGLE-BOX
133 SIZE 14.29 BY .8
134 FONT 10
135 RP.Log4 AT ROW 3.6 COL 40.43
136 LABEL "Include zero-value debtors"
137 VIEW-AS TOGGLE-BOX
138 SIZE 21.72 BY .8
139 RP.Int2 AT ROW 4.6 COL 9.29 COLON-ALIGNED
140 LABEL "Tenant" FORMAT "99999"
141 VIEW-AS FILL-IN
142 SIZE 6.57 BY 1
143 FONT 10
144 RP.Int1 AT ROW 4.6 COL 9.29 COLON-ALIGNED
145 LABEL "Property" FORMAT "99999"
146 VIEW-AS FILL-IN
147 SIZE 6.57 BY 1
148 FONT 10
149 fil_Tenant AT ROW 4.6 COL 19 COLON-ALIGNED NO-LABEL
150 fil_Property AT ROW 4.6 COL 19 COLON-ALIGNED NO-LABEL
151 RP.Char2 AT ROW 6.8 COL 2.14 NO-LABEL
152 VIEW-AS RADIO-SET VERTICAL
153 RADIO-BUTTONS
154 "Include all months", "All":U,
155 "For a range of months", "Range":U
156 SIZE 17.72 BY 1.6
157 FONT 10
158 cmb_startmonth AT ROW 8.5 COL 6.86
159 cmb_endmonth AT ROW 9.5 COL 8.28
160 btn_print AT ROW 9.8 COL 55.86
161 RECT-23 AT ROW 1 COL 1
162 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
163 SIDE-LABELS NO-UNDERLINE THREE-D
164 AT COL 1 ROW 1 SCROLLABLE
165 FONT 10
166 DEFAULT-BUTTON btn_print.
169 /* *********************** Procedure Settings ************************ */
171 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
172 /* Settings for THIS-PROCEDURE
173 Type: SmartViewer
174 External Tables: ttpl.RP
175 Allow: Basic,DB-Fields
176 Frames: 1
177 Add Fields to: EXTERNAL-TABLES
178 Other Settings: PERSISTENT-ONLY COMPILE
181 /* This procedure should always be RUN PERSISTENT. Report the error, */
182 /* then cleanup and return. */
183 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
184 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT."
185 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
186 RETURN.
187 END.
189 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
191 /* ************************* Create Window ************************** */
193 &ANALYZE-SUSPEND _CREATE-WINDOW
194 /* DESIGN Window definition (used by the UIB)
195 CREATE WINDOW V-table-Win ASSIGN
196 HEIGHT = 11.3
197 WIDTH = 71.14.
198 /* END WINDOW DEFINITION */
200 &ANALYZE-RESUME
203 /* *************** Runtime Attributes and UIB Settings ************** */
205 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
206 /* SETTINGS FOR WINDOW V-table-Win
207 VISIBLE,,RUN-PERSISTENT */
208 /* SETTINGS FOR FRAME F-Main
209 NOT-VISIBLE Size-to-Fit */
210 ASSIGN
211 FRAME F-Main:SCROLLABLE = FALSE
212 FRAME F-Main:HIDDEN = TRUE.
214 /* SETTINGS FOR COMBO-BOX cmb_endmonth IN FRAME F-Main
215 ALIGN-L */
216 /* SETTINGS FOR COMBO-BOX cmb_startmonth IN FRAME F-Main
217 ALIGN-L */
218 /* SETTINGS FOR FILL-IN fil_Property IN FRAME F-Main
219 NO-ENABLE */
220 /* SETTINGS FOR FILL-IN fil_Tenant IN FRAME F-Main
221 NO-ENABLE */
222 /* SETTINGS FOR FILL-IN RP.Int1 IN FRAME F-Main
223 EXP-LABEL EXP-FORMAT */
224 /* SETTINGS FOR FILL-IN RP.Int2 IN FRAME F-Main
225 EXP-LABEL EXP-FORMAT */
226 /* SETTINGS FOR TOGGLE-BOX RP.Log1 IN FRAME F-Main
227 EXP-LABEL */
228 /* SETTINGS FOR TOGGLE-BOX RP.Log2 IN FRAME F-Main
229 EXP-LABEL */
230 /* SETTINGS FOR TOGGLE-BOX RP.Log3 IN FRAME F-Main
231 EXP-LABEL EXP-HELP */
232 /* SETTINGS FOR TOGGLE-BOX RP.Log4 IN FRAME F-Main
233 EXP-LABEL */
234 /* _RUN-TIME-ATTRIBUTES-END */
235 &ANALYZE-RESUME
238 /* Setting information for Queries and Browse Widgets fields */
240 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
241 /* Query rebuild information for FRAME F-Main
242 _Options = "NO-LOCK"
243 _Query is NOT OPENED
244 */ /* FRAME F-Main */
245 &ANALYZE-RESUME
250 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB V-table-Win
251 /* ************************* Included-Libraries *********************** */
253 {src/adm/method/viewer.i}
254 {inc/method/m-mntvwr.i}
256 /* _UIB-CODE-BLOCK-END */
257 &ANALYZE-RESUME
262 /* ************************ Control Triggers ************************ */
264 &Scoped-define SELF-NAME btn_print
265 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_print V-table-Win
266 ON CHOOSE OF btn_print IN FRAME F-Main /* OK */
268 SELF:SENSITIVE = No.
269 RUN run-report.
270 SELF:SENSITIVE = Yes.
271 END.
273 /* _UIB-CODE-BLOCK-END */
274 &ANALYZE-RESUME
277 &Scoped-define SELF-NAME RP.Char1
278 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Char1 V-table-Win
279 ON VALUE-CHANGED OF RP.Char1 IN FRAME F-Main /* Char1 */
281 RUN tenant-options-changed.
282 END.
284 /* _UIB-CODE-BLOCK-END */
285 &ANALYZE-RESUME
288 &Scoped-define SELF-NAME RP.Char2
289 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Char2 V-table-Win
290 ON VALUE-CHANGED OF RP.Char2 IN FRAME F-Main /* Char2 */
292 RUN month-options-changed.
293 END.
295 /* _UIB-CODE-BLOCK-END */
296 &ANALYZE-RESUME
299 &Scoped-define SELF-NAME cmb_endmonth
300 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_endmonth V-table-Win
301 ON U1 OF cmb_endmonth IN FRAME F-Main /* To */
303 {inc/selcmb/scmthe1.i "RP" "Int4"}
304 END.
306 /* _UIB-CODE-BLOCK-END */
307 &ANALYZE-RESUME
310 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_endmonth V-table-Win
311 ON U2 OF cmb_endmonth IN FRAME F-Main /* To */
313 {inc/selcmb/scmthe2.i "RP" "Int4"}
314 END.
316 /* _UIB-CODE-BLOCK-END */
317 &ANALYZE-RESUME
320 &Scoped-define SELF-NAME cmb_startmonth
321 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_startmonth V-table-Win
322 ON U1 OF cmb_startmonth IN FRAME F-Main /* From */
324 {inc/selcmb/scmths1.i "RP" "Int3"}
325 END.
327 /* _UIB-CODE-BLOCK-END */
328 &ANALYZE-RESUME
331 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_startmonth V-table-Win
332 ON U2 OF cmb_startmonth IN FRAME F-Main /* From */
334 {inc/selcmb/scmths2.i "RP" "Int3"}
335 END.
337 /* _UIB-CODE-BLOCK-END */
338 &ANALYZE-RESUME
341 &Scoped-define SELF-NAME fil_Property
342 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_Property V-table-Win
343 ON U1 OF fil_Property IN FRAME F-Main
345 {inc/selfil/sfpro1.i "RP" "Int1"}
346 END.
348 /* _UIB-CODE-BLOCK-END */
349 &ANALYZE-RESUME
352 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_Property V-table-Win
353 ON U2 OF fil_Property IN FRAME F-Main
355 {inc/selfil/sfpro2.i "RP" "Int1"}
356 END.
358 /* _UIB-CODE-BLOCK-END */
359 &ANALYZE-RESUME
362 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_Property V-table-Win
363 ON U3 OF fil_Property IN FRAME F-Main
365 {inc/selfil/sfpro3.i "RP" "Int1"}
366 END.
368 /* _UIB-CODE-BLOCK-END */
369 &ANALYZE-RESUME
372 &Scoped-define SELF-NAME fil_Tenant
373 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_Tenant V-table-Win
374 ON U1 OF fil_Tenant IN FRAME F-Main
376 {inc/selfil/sftnt1.i "RP" "Int2"}
377 END.
379 /* _UIB-CODE-BLOCK-END */
380 &ANALYZE-RESUME
383 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_Tenant V-table-Win
384 ON U2 OF fil_Tenant IN FRAME F-Main
386 {inc/selfil/sftnt2.i "RP" "Int2"}
387 END.
389 /* _UIB-CODE-BLOCK-END */
390 &ANALYZE-RESUME
393 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_Tenant V-table-Win
394 ON U3 OF fil_Tenant IN FRAME F-Main
396 {inc/selfil/sftnt3.i "RP" "Int2"}
397 END.
399 /* _UIB-CODE-BLOCK-END */
400 &ANALYZE-RESUME
403 &Scoped-define SELF-NAME RP.Int1
404 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Int1 V-table-Win
405 ON LEAVE OF RP.Int1 IN FRAME F-Main /* Property */
407 {inc/selcde/cdpro.i "fil_Property"}
408 END.
410 /* _UIB-CODE-BLOCK-END */
411 &ANALYZE-RESUME
414 &Scoped-define SELF-NAME RP.Int2
415 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Int2 V-table-Win
416 ON LEAVE OF RP.Int2 IN FRAME F-Main /* Tenant */
418 {inc/selcde/cdtnt.i "fil_Tenant"}
419 END.
421 /* _UIB-CODE-BLOCK-END */
422 &ANALYZE-RESUME
425 &Scoped-define SELF-NAME RP.Log1
426 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Log1 V-table-Win
427 ON VALUE-CHANGED OF RP.Log1 IN FRAME F-Main /* Open items only */
429 RUN open-items-changed.
430 END.
432 /* _UIB-CODE-BLOCK-END */
433 &ANALYZE-RESUME
436 &Scoped-define SELF-NAME RP.Log3
437 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Log3 V-table-Win
438 ON VALUE-CHANGED OF RP.Log3 IN FRAME F-Main /* Summarise Part-Closed Groups */
440 RUN dispatch( 'enable-fields':U ).
441 END.
443 /* _UIB-CODE-BLOCK-END */
444 &ANALYZE-RESUME
447 &UNDEFINE SELF-NAME
449 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK V-table-Win
452 /* *************************** Main Block *************************** */
454 /* _UIB-CODE-BLOCK-END */
455 &ANALYZE-RESUME
458 /* ********************** Internal Procedures *********************** */
460 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available V-table-Win
461 PROCEDURE adm-row-available :
462 /*------------------------------------------------------------------------------
463 Purpose: Override (thoroughly!) the Progress adm-row-available
464 ------------------------------------------------------------------------------*/
466 /* Define variables needed by this internal procedure. */
467 {src/adm/template/row-head.i}
469 /* Create a list of all the tables that we need to get. */
470 {src/adm/template/row-list.i "Creditor"}
472 /* Get the record ROWID's from the RECORD-SOURCE. */
473 {src/adm/template/row-get.i}
475 /* FIND each record specified by the RECORD-SOURCE. */
476 {src/adm/template/row-find.i "Creditor"}
478 /* Process the newly available records (i.e. display fields,
479 open queries, and/or pass records on to any RECORD-TARGETS). */
480 {src/adm/template/row-end.i}
482 END PROCEDURE.
484 /* _UIB-CODE-BLOCK-END */
485 &ANALYZE-RESUME
488 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI V-table-Win _DEFAULT-DISABLE
489 PROCEDURE disable_UI :
490 /*------------------------------------------------------------------------------
491 Purpose: DISABLE the User Interface
492 Parameters: <none>
493 Notes: Here we clean-up the user-interface by deleting
494 dynamic widgets we have created and/or hide
495 frames. This procedure is usually called when
496 we are ready to "clean-up" after running.
497 ------------------------------------------------------------------------------*/
498 /* Hide all frames. */
499 HIDE FRAME F-Main.
500 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
501 END PROCEDURE.
503 /* _UIB-CODE-BLOCK-END */
504 &ANALYZE-RESUME
507 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-enable-fields V-table-Win
508 PROCEDURE inst-enable-fields :
509 /*------------------------------------------------------------------------------
510 Purpose:
511 Parameters: <none>
512 Notes:
513 ------------------------------------------------------------------------------*/
515 RUN tenant-options-changed.
516 RUN month-options-changed.
517 RUN open-items-changed.
518 RUN summarise-changed.
520 END PROCEDURE.
522 /* _UIB-CODE-BLOCK-END */
523 &ANALYZE-RESUME
526 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-initialize V-table-Win
527 PROCEDURE inst-initialize :
528 /*------------------------------------------------------------------------------
529 Purpose:
530 Parameters: <none>
531 Notes:
532 ------------------------------------------------------------------------------*/
534 DEF VAR user-name AS CHAR NO-UNDO.
536 RUN get-username IN sys-mgr( OUTPUT user-name ).
538 FIND RP WHERE
539 RP.UserName = user-name AND
540 RP.ReportID = {&REPORT-ID} NO-ERROR.
542 IF NOT AVAILABLE RP THEN
543 DO WITH FRAME {&FRAME-NAME}:
544 CREATE RP.
545 ASSIGN
546 RP.ReportID = {&REPORT-ID}
547 RP.UserName = user-name
548 RP.Char1 = "All"
549 RP.Char2 = "All"
550 RP.Log1 = Yes
551 RP.Log2 = Yes.
552 END.
554 RUN dispatch( 'display-fields':U ).
555 RUN dispatch( 'enable-fields':U ).
557 END PROCEDURE.
559 /* _UIB-CODE-BLOCK-END */
560 &ANALYZE-RESUME
563 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE month-options-changed V-table-Win
564 PROCEDURE month-options-changed :
565 /*------------------------------------------------------------------------------
566 Purpose:
567 Parameters: <none>
568 Notes:
569 ------------------------------------------------------------------------------*/
571 DEF VAR options AS CHAR NO-UNDO.
572 options = INPUT FRAME {&FRAME-NAME} RP.CHar2.
574 cmb_startmonth:SENSITIVE = options <> "All" AND RP.Char2:SENSITIVE.
575 cmb_endmonth:SENSITIVE = options <> "All" AND RP.Char2:SENSITIVE.
577 END PROCEDURE.
579 /* _UIB-CODE-BLOCK-END */
580 &ANALYZE-RESUME
583 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE open-items-changed V-table-Win
584 PROCEDURE open-items-changed :
585 /*------------------------------------------------------------------------------
586 Purpose:
587 Parameters: <none>
588 Notes:
589 ------------------------------------------------------------------------------*/
591 DEF VAR open-items AS LOGI NO-UNDO.
592 open-items = INPUT FRAME {&FRAME-NAME} RP.Log1.
594 RP.Char2:SENSITIVE = NOT open-items.
595 RUN month-options-changed.
597 END PROCEDURE.
599 /* _UIB-CODE-BLOCK-END */
600 &ANALYZE-RESUME
603 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE post-initialize V-table-Win
604 PROCEDURE post-initialize :
605 /*------------------------------------------------------------------------------
606 Purpose:
607 Parameters: <none>
608 Notes:
609 ------------------------------------------------------------------------------*/
611 RUN tenant-options-changed.
613 END PROCEDURE.
615 /* _UIB-CODE-BLOCK-END */
616 &ANALYZE-RESUME
619 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-destroy V-table-Win
620 PROCEDURE pre-destroy :
621 /*------------------------------------------------------------------------------
622 Purpose:
623 Parameters: <none>
624 Notes:
625 ------------------------------------------------------------------------------*/
627 RUN check-modified( "CLEAR" ).
629 END PROCEDURE.
631 /* _UIB-CODE-BLOCK-END */
632 &ANALYZE-RESUME
635 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE run-report V-table-Win
636 PROCEDURE run-report :
637 /*------------------------------------------------------------------------------
638 Purpose: Actually run the report through RB engine.
639 ------------------------------------------------------------------------------*/
640 DEF VAR report-options AS CHAR NO-UNDO.
642 RUN verify-report.
643 IF RETURN-VALUE = "FAIL" THEN RETURN.
645 RUN dispatch( 'update-record':U ).
647 report-options = RP.Char1 + ","
648 + STRING( RP.Int1 ) + "," /* property code */
649 + STRING( RP.Int2 ) + "," /* tenant code */
650 + RP.Char2 + ","
651 + STRING( RP.Log1 ) + "," /* open */
652 + STRING( RP.Log2 ) + "," /* active */
653 + STRING( RP.Int3 ) + "," /* from month */
654 + STRING( RP.Int4 ) + "," /* to month */
655 + STRING( RP.Log3 ) + "," /* summarise */
656 + STRING( RP.Log4 ) + "," . /* zero-value */
658 {inc/bq-do.i "process/report/statemnt.p" "report-options" "No"}
660 END PROCEDURE.
662 /* _UIB-CODE-BLOCK-END */
663 &ANALYZE-RESUME
666 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records V-table-Win
667 PROCEDURE send-records :
668 /*------------------------------------------------------------------------------
669 Purpose:
670 ------------------------------------------------------------------------------*/
672 /* Define variables needed by this internal procedure. */
673 {src/adm/template/snd-head.i}
675 /* For each requested table, put it's ROWID in the output list. */
676 {src/adm/template/snd-list.i "Creditor"}
678 /* Deal with any unexpected table requests before closing. */
679 {src/adm/template/snd-end.i}
681 END PROCEDURE.
683 /* _UIB-CODE-BLOCK-END */
684 &ANALYZE-RESUME
687 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed V-table-Win
688 PROCEDURE state-changed :
689 /* -----------------------------------------------------------
690 Purpose:
691 Parameters: <none>
692 Notes:
693 -------------------------------------------------------------*/
694 DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
695 DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
697 CASE p-state:
698 /* Object instance CASEs can go here to replace standard behavior
699 or add new cases. */
700 {src/adm/template/vstates.i}
701 END CASE.
702 END PROCEDURE.
704 /* _UIB-CODE-BLOCK-END */
705 &ANALYZE-RESUME
708 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE summarise-changed V-table-Win
709 PROCEDURE summarise-changed :
710 /*------------------------------------------------------------------------------
711 Purpose:
712 Parameters: <none>
713 Notes:
714 ------------------------------------------------------------------------------*/
715 DEF VAR summarise AS LOGI NO-UNDO.
716 summarise = INPUT FRAME {&FRAME-NAME} RP.Log3.
718 RP.Log1:SENSITIVE = NOT summarise.
720 END PROCEDURE.
722 /* _UIB-CODE-BLOCK-END */
723 &ANALYZE-RESUME
726 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE tenant-options-changed V-table-Win
727 PROCEDURE tenant-options-changed :
728 /*------------------------------------------------------------------------------
729 Purpose:
730 Parameters: <none>
731 Notes:
732 ------------------------------------------------------------------------------*/
734 DEF VAR options AS CHAR NO-UNDO.
735 options = INPUT FRAME {&FRAME-NAME} RP.Char1.
737 CASE options:
738 WHEN "ALL" THEN
739 DO WITH FRAME {&FRAME-NAME}:
740 HIDE RP.Int1 Rp.Int2 fil_Property fil_Tenant.
741 RUN set-link-attributes IN sys-mgr( THIS-PROCEDURE, STRING( fil_Property:HANDLE ), "HIDDEN = Yes":U ).
742 RUN set-link-attributes IN sys-mgr( THIS-PROCEDURE, STRING( fil_Tenant:HANDLE ), "HIDDEN = Yes":U ).
743 END.
745 WHEN "Tenant" THEN
746 DO WITH FRAME {&FRAME-NAME}:
747 HIDE RP.Int1 fil_Property.
748 VIEW RP.Int2 fil_Tenant.
749 RUN set-link-attributes IN sys-mgr( THIS-PROCEDURE, STRING( fil_Property:HANDLE ), "HIDDEN = Yes":U ).
750 RUN set-link-attributes IN sys-mgr( THIS-PROCEDURE, STRING( fil_Tenant:HANDLE ), "HIDDEN = No":U ).
751 END.
753 WHEN "Property" THEN
754 DO WITH FRAME {&FRAME-NAME}:
755 HIDE RP.Int2 fil_Tenant.
756 VIEW RP.Int1 fil_Property.
757 RUN set-link-attributes IN sys-mgr( THIS-PROCEDURE, STRING( fil_Tenant:HANDLE ), "HIDDEN = Yes":U ).
758 RUN set-link-attributes IN sys-mgr( THIS-PROCEDURE, STRING( fil_Property:HANDLE ), "HIDDEN = No":U ).
759 END.
761 END.
763 END PROCEDURE.
765 /* _UIB-CODE-BLOCK-END */
766 &ANALYZE-RESUME
769 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE verify-report V-table-Win
770 PROCEDURE verify-report :
771 /*------------------------------------------------------------------------------
772 Purpose:
773 Parameters: <none>
774 Notes:
775 ------------------------------------------------------------------------------*/
777 CASE INPUT FRAME {&FRAME-NAME} RP.Char1:
779 WHEN 'Single' THEN
780 IF NOT CAN-FIND( FIRST Tenant WHERE Tenant.TenantCode =
781 INPUT FRAME {&FRAME-NAME} RP.Int2 ) THEN
783 MESSAGE "You must select a Tenant" VIEW-AS ALERT-BOX ERROR.
784 APPLY 'ENTRY':U TO RP.Int2 IN FRAME {&FRAME-NAME}.
785 RETURN "FAIL".
786 END.
788 WHEN 'Property' THEN
789 IF NOT CAN-FIND( FIRST Property WHERE Property.PropertyCode =
790 INPUT FRAME {&FRAME-NAME} RP.Int1 ) THEN
792 MESSAGE "You must select a property" VIEW-AS ALERT-BOX ERROR.
793 APPLY 'ENTRY':U TO RP.Int1 IN FRAME {&FRAME-NAME}.
794 RETURN "FAIL".
795 END.
797 END.
799 IF NOT INPUT FRAME {&FRAME-NAME} RP.Log1 AND
800 INPUT FRAME {&FRAME-NAME} Rp.Char2 = "Range" AND
801 ( cmb_startmonth:SCREEN-VALUE = "" OR cmb_startmonth:SCREEN-VALUE = ? OR
802 cmb_endmonth:SCREEN-VALUE = "" OR cmb_endmonth:SCREEN-VALUE = ? ) THEN
804 MESSAGE "You must select a month range" VIEW-AS ALERT-BOX ERROR.
805 APPLY 'ENTRY':U TO cmb_startmonth IN FRAME {&FRAME-NAME}.
806 RETURN "FAIL".
807 END.
809 END PROCEDURE.
811 /* _UIB-CODE-BLOCK-END */
812 &ANALYZE-RESUME