1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1
6 &Scoped-define WINDOW-NAME CURRENT-WINDOW
7 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS V-table-Win
8 /*------------------------------------------------------------------------
9 ------------------------------------------------------------------------*/
13 /* *************************** Definitions
************************** */
15 &SCOPED-DEFINE REPORT-ID "Tenant Aged Balances"
17 /* _UIB-CODE-BLOCK-END
*/
21 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
23 /* ******************** Preprocessor Definitions
******************** */
25 &Scoped-define PROCEDURE-TYPE SmartViewer
26 &Scoped-define DB-AWARE no
28 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
30 /* Name of first Frame and
/or Browse and
/or first Query
*/
31 &Scoped-define FRAME-NAME F-Main
34 &Scoped-define EXTERNAL-TABLES RP
35 &Scoped-define FIRST-EXTERNAL-TABLE RP
38 /* Need to scope the external tables to this procedure
*/
39 DEFINE QUERY external_tables
FOR RP.
40 /* Standard List Definitions
*/
41 &Scoped-Define ENABLED-FIELDS RP.Char3 RP.Log7 RP.Int1 RP.Int2 RP.Char5 ~
42 RP.Char6 RP.Char1 RP.Dec1 RP.Log5 RP.Dec2 RP.Log4 RP.Int4 RP.Log6 RP.Log8 ~
43 RP.Log1 RP.Log2 RP.Char2 RP.Log3
44 &Scoped-define ENABLED-TABLES RP
45 &Scoped-define FIRST-ENABLED-TABLE RP
46 &Scoped-define DISPLAYED-TABLES RP
47 &Scoped-define FIRST-DISPLAYED-TABLE RP
48 &Scoped-Define ENABLED-OBJECTS cmb_ConsolidationList cmb_month btn_Browse ~
49 tgl_NoOpenItems btn_print RECT-29
50 &Scoped-Define DISPLAYED-FIELDS RP.Char3 RP.Log7 RP.Int1 RP.Int2 RP.Char5 ~
51 RP.Char6 RP.Char1 RP.Dec1 RP.Log5 RP.Dec2 RP.Log4 RP.Int4 RP.Log6 RP.Log8 ~
52 RP.Log1 RP.Log2 RP.Char2 RP.Log3
53 &Scoped-Define DISPLAYED-OBJECTS cmb_ConsolidationList fil_PropertyFrom ~
54 fil_PropertyTo cmb_month tgl_NoOpenItems
56 /* Custom List Definitions
*/
57 /* ADM-CREATE-FIELDS
,ADM-ASSIGN-FIELDS
,List-3
,List-4
,List-5
,List-6
*/
59 /* _UIB-PREPROCESSOR-BLOCK-END
*/
64 /* *********************** Control Definitions
********************** */
67 /* Definitions of the field level widgets
*/
68 DEFINE BUTTON btn_Browse
72 DEFINE BUTTON btn_print
DEFAULT
77 DEFINE VARIABLE cmb_ConsolidationList
AS CHARACTER FORMAT "X(256)":U
78 VIEW-AS COMBO-BOX INNER-LINES 5
81 SIZE 43.43 BY 1 NO-UNDO.
83 DEFINE VARIABLE cmb_month
AS CHARACTER FORMAT "X(256)":U
84 VIEW-AS COMBO-BOX INNER-LINES 10
88 DEFINE VARIABLE fil_PropertyFrom
AS CHARACTER FORMAT "X(256)":U
90 SIZE 49.72 BY 1 NO-UNDO.
92 DEFINE VARIABLE fil_PropertyTo
AS CHARACTER FORMAT "X(256)":U
94 SIZE 49.72 BY 1 NO-UNDO.
96 DEFINE RECTANGLE RECT-29
97 EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
100 DEFINE VARIABLE tgl_NoOpenItems
AS LOGICAL INITIAL no
101 LABEL "Do not use open-item transactions"
103 SIZE 26.29 BY .8 NO-UNDO.
106 /* ************************ Frame Definitions
*********************** */
109 RP.Char3
AT ROW 1.2 COL 5 HELP
111 VIEW-AS RADIO-SET VERTICAL
113 "All properties", "AllProperties":U
,
114 "All Companies", "AllCompanies":U
,
115 "Company List", "CompanyList":U
,
116 "Range of Properties", "PropertyRange":U
118 RP.Log7
AT ROW 1.9 COL 23.57
119 LABEL "Non-property only"
122 cmb_ConsolidationList
AT ROW 2.8 COL 21.29 COLON-ALIGNED NO-LABEL
123 RP.Int1
AT ROW 4.4 COL 5.86 COLON-ALIGNED
124 LABEL "Property" FORMAT "99999"
127 fil_PropertyFrom
AT ROW 4.4 COL 15 COLON-ALIGNED NO-LABEL
128 RP.Int2
AT ROW 5.4 COL 5.86 COLON-ALIGNED
129 LABEL "To" FORMAT "99999"
132 fil_PropertyTo
AT ROW 5.4 COL 15 COLON-ALIGNED NO-LABEL
133 RP.Char5
AT ROW 6.7 COL 5 HELP
135 VIEW-AS RADIO-SET VERTICAL
137 "by Property Manager", "ByManager":U
,
138 "by Company List", "ByCompany":U
,
139 "by Debt Classification", "ByDebtClass":U
141 RP.Char6
AT ROW 7.4 COL 36.43 HELP
143 VIEW-AS RADIO-SET VERTICAL
145 "Numeric - by Tenant Code", "N":U
,
146 "Alphabetic - by Name", "A":U
148 RP.Char1
AT ROW 9.6 COL 5 NO-LABEL
149 VIEW-AS RADIO-SET VERTICAL
151 "As at Today", "TODAY":U
,
152 "At a particular month ending", "MONTH":U
155 cmb_month
AT ROW 10.2 COL 29 NO-LABEL
156 RP.Dec1
AT ROW 12 COL 14.72 COLON-ALIGNED
157 LABEL "Minimum current" FORMAT "->,>>>,>>9.99"
161 RP.Log5
AT ROW 12.1 COL 30.14
162 LABEL "Only include current debit balances"
165 RP.Dec2
AT ROW 13.2 COL 27 COLON-ALIGNED
166 LABEL "Minimum" FORMAT "->,>>>,>>9.99"
169 RP.Log4
AT ROW 13.3 COL 5
170 LABEL "Overdue tests:"
173 RP.Int4
AT ROW 13.3 COL 43.57 HELP
175 VIEW-AS RADIO-SET HORIZONTAL
181 RP.Log6
AT ROW 14.6 COL 5
182 LABEL "Exclude automatic rent charges"
184 SIZE 26.29 BY .85 TOOLTIP "Excludes transactions from the monthly rent charge batch"
185 RP.Log8
AT ROW 15.75 COL 5
186 LABEL "Completely hide unreported credits && minor debits"
189 RP.Log1
AT ROW 17 COL 5
194 RP.Log2
AT ROW 18 COL 5 HELP
199 RP.Char2
AT ROW 18 COL 10.43 COLON-ALIGNED HELP
200 "" NO-LABEL FORMAT "X(256)"
204 /* DEFINE FRAME statement is approaching
4K Bytes. Breaking it up
*/
206 btn_Browse
AT ROW 18 COL 57
207 RP.Log3
AT ROW 19.4 COL 5
211 tgl_NoOpenItems
AT ROW 19.6 COL 26.14
212 btn_print
AT ROW 19.6 COL 57
213 RECT-29
AT ROW 1 COL 1
214 "Tenant ordering within groupings" VIEW-AS TEXT
215 SIZE 23.43 BY .65 AT ROW 6.6 COL 31.86
217 SIZE 2 BY .9 AT ROW 13.3 COL 41.29
218 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
219 SIDE-LABELS NO-UNDERLINE THREE-D
220 AT COL 1 ROW 1 SCROLLABLE
222 DEFAULT-BUTTON btn_print.
225 /* *********************** Procedure Settings
************************ */
227 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
228 /* Settings for
THIS-PROCEDURE
230 External Tables
: TTPL.RP
231 Allow
: Basic
,DB-Fields
233 Add Fields to
: EXTERNAL-TABLES
234 Other Settings
: PERSISTENT-ONLY
COMPILE
237 /* This procedure should always be
RUN PERSISTENT. Report the error
, */
238 /* then cleanup and return.
*/
239 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
240 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
241 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
245 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
247 /* ************************* Create Window
************************** */
249 &ANALYZE-SUSPEND _CREATE-WINDOW
250 /* DESIGN Window definition
(used by the UIB
)
251 CREATE WINDOW V-table-Win
ASSIGN
254 /* END WINDOW DEFINITION
*/
258 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB V-table-Win
259 /* ************************* Included-Libraries
*********************** */
261 {src
/adm
/method
/viewer.i
}
262 {inc
/method
/m-mntvwr.i
}
264 /* _UIB-CODE-BLOCK-END
*/
270 /* *********** Runtime Attributes and AppBuilder Settings
*********** */
272 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
273 /* SETTINGS
FOR WINDOW V-table-Win
274 VISIBLE,,RUN-PERSISTENT
*/
275 /* SETTINGS
FOR FRAME F-Main
276 NOT-VISIBLE Size-to-Fit
*/
278 FRAME F-Main
:SCROLLABLE = FALSE
279 FRAME F-Main
:HIDDEN = TRUE.
281 /* SETTINGS
FOR FILL-IN RP.Char2
IN FRAME F-Main
282 EXP-LABEL EXP-FORMAT EXP-HELP
*/
283 /* SETTINGS
FOR RADIO-SET RP.Char3
IN FRAME F-Main
285 /* SETTINGS
FOR RADIO-SET RP.Char5
IN FRAME F-Main
287 /* SETTINGS
FOR RADIO-SET RP.Char6
IN FRAME F-Main
289 /* SETTINGS
FOR COMBO-BOX cmb_month
IN FRAME F-Main
291 /* SETTINGS
FOR FILL-IN RP.Dec1
IN FRAME F-Main
292 EXP-LABEL EXP-FORMAT
*/
293 /* SETTINGS
FOR FILL-IN RP.Dec2
IN FRAME F-Main
294 EXP-LABEL EXP-FORMAT
*/
295 /* SETTINGS
FOR FILL-IN fil_PropertyFrom
IN FRAME F-Main
297 /* SETTINGS
FOR FILL-IN fil_PropertyTo
IN FRAME F-Main
299 /* SETTINGS
FOR FILL-IN RP.Int1
IN FRAME F-Main
300 EXP-LABEL EXP-FORMAT
*/
301 /* SETTINGS
FOR FILL-IN RP.Int2
IN FRAME F-Main
302 EXP-LABEL EXP-FORMAT
*/
303 /* SETTINGS
FOR RADIO-SET RP.Int4
IN FRAME F-Main
305 /* SETTINGS
FOR TOGGLE-BOX RP.Log1
IN FRAME F-Main
307 /* SETTINGS
FOR TOGGLE-BOX RP.Log2
IN FRAME F-Main
308 EXP-LABEL EXP-HELP
*/
309 /* SETTINGS
FOR TOGGLE-BOX RP.Log3
IN FRAME F-Main
311 /* SETTINGS
FOR TOGGLE-BOX RP.Log4
IN FRAME F-Main
313 /* SETTINGS
FOR TOGGLE-BOX RP.Log5
IN FRAME F-Main
315 /* SETTINGS
FOR TOGGLE-BOX RP.Log6
IN FRAME F-Main
317 /* SETTINGS
FOR TOGGLE-BOX RP.Log7
IN FRAME F-Main
319 /* SETTINGS
FOR TOGGLE-BOX RP.Log8
IN FRAME F-Main
321 /* _RUN-TIME-ATTRIBUTES-END
*/
325 /* Setting information for Queries and Browse Widgets fields
*/
327 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
328 /* Query rebuild information for
FRAME F-Main
331 */ /* FRAME F-Main
*/
338 /* ************************ Control Triggers
************************ */
340 &Scoped-define SELF-NAME btn_Browse
341 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_Browse V-table-Win
342 ON CHOOSE OF btn_Browse
IN FRAME F-Main
/* Browse
*/
344 RUN select-file-dialog.
347 /* _UIB-CODE-BLOCK-END
*/
351 &Scoped-define SELF-NAME btn_print
352 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_print V-table-Win
353 ON CHOOSE OF btn_print
IN FRAME F-Main
/* OK */
357 SELF:SENSITIVE = Yes.
360 /* _UIB-CODE-BLOCK-END
*/
364 &Scoped-define SELF-NAME RP.Char1
365 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Char1 V-table-Win
366 ON VALUE-CHANGED
OF RP.Char1
IN FRAME F-Main
/* Char1
*/
368 RUN month-ending-changed.
371 /* _UIB-CODE-BLOCK-END
*/
375 &Scoped-define SELF-NAME RP.Char3
376 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Char3 V-table-Win
377 ON VALUE-CHANGED
OF RP.Char3
IN FRAME F-Main
/* Char3
*/
379 RUN enable-appropriate-fields.
382 /* _UIB-CODE-BLOCK-END
*/
386 &Scoped-define SELF-NAME RP.Char5
387 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Char5 V-table-Win
388 ON VALUE-CHANGED
OF RP.Char5
IN FRAME F-Main
/* Char5
*/
390 RUN enable-appropriate-fields.
393 /* _UIB-CODE-BLOCK-END
*/
397 &Scoped-define SELF-NAME cmb_ConsolidationList
398 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_ConsolidationList V-table-Win
399 ON U1
OF cmb_ConsolidationList
IN FRAME F-Main
401 {inc
/selcmb
/sccls1.i
"RP" "Char4"}
404 /* _UIB-CODE-BLOCK-END
*/
408 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_ConsolidationList V-table-Win
409 ON U2
OF cmb_ConsolidationList
IN FRAME F-Main
411 {inc
/selcmb
/sccls2.i
"RP" "Char4"}
414 /* _UIB-CODE-BLOCK-END
*/
418 &Scoped-define SELF-NAME cmb_month
419 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_month V-table-Win
420 ON U1
OF cmb_month
IN FRAME F-Main
422 {inc
/selcmb
/scmthe1.i
"RP" "Int3"}
425 /* _UIB-CODE-BLOCK-END
*/
429 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_month V-table-Win
430 ON U2
OF cmb_month
IN FRAME F-Main
432 {inc
/selcmb
/scmthe2.i
"RP" "Int3"}
435 /* _UIB-CODE-BLOCK-END
*/
439 &Scoped-define SELF-NAME fil_PropertyFrom
440 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_PropertyFrom V-table-Win
441 ON U1
OF fil_PropertyFrom
IN FRAME F-Main
443 {inc
/selfil
/sfpro1.i
"RP" "Int1"}
446 /* _UIB-CODE-BLOCK-END
*/
450 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_PropertyFrom V-table-Win
451 ON U2
OF fil_PropertyFrom
IN FRAME F-Main
453 {inc
/selfil
/sfpro2.i
"RP" "Int1"}
454 ASSIGN RP.int2
:SCREEN-VALUE IN FRAME {&FRAME-NAME} = STRING( RP.Int1 ).
455 APPLY '
LEAVE'
:U
TO RP.Int2
IN FRAME {&FRAME-NAME}.
458 /* _UIB-CODE-BLOCK-END
*/
462 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_PropertyFrom V-table-Win
463 ON U3
OF fil_PropertyFrom
IN FRAME F-Main
465 {inc
/selfil
/sfpro3.i
"RP" "Int1"}
468 /* _UIB-CODE-BLOCK-END
*/
472 &Scoped-define SELF-NAME fil_PropertyTo
473 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_PropertyTo V-table-Win
474 ON U1
OF fil_PropertyTo
IN FRAME F-Main
476 {inc
/selfil
/sfpro1.i
"RP" "Int2"}
479 /* _UIB-CODE-BLOCK-END
*/
483 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_PropertyTo V-table-Win
484 ON U2
OF fil_PropertyTo
IN FRAME F-Main
486 {inc
/selfil
/sfpro2.i
"RP" "Int2"}
489 /* _UIB-CODE-BLOCK-END
*/
493 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL fil_PropertyTo V-table-Win
494 ON U3
OF fil_PropertyTo
IN FRAME F-Main
496 {inc
/selfil
/sfpro3.i
"RP" "Int2"}
499 /* _UIB-CODE-BLOCK-END
*/
503 &Scoped-define SELF-NAME RP.Int1
504 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Int1 V-table-Win
505 ON LEAVE OF RP.Int1
IN FRAME F-Main
/* Property
*/
507 {inc
/selcde
/cdpro.i
"fil_PropertyFrom"}
510 /* _UIB-CODE-BLOCK-END
*/
514 &Scoped-define SELF-NAME RP.Int2
515 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Int2 V-table-Win
516 ON LEAVE OF RP.Int2
IN FRAME F-Main
/* To
*/
518 {inc
/selcde
/cdpro.i
"fil_PropertyTo"}
521 /* _UIB-CODE-BLOCK-END
*/
525 &Scoped-define SELF-NAME RP.Log2
526 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Log2 V-table-Win
527 ON VALUE-CHANGED
OF RP.Log2
IN FRAME F-Main
/* Export
*/
529 RUN enable-appropriate-fields.
532 /* _UIB-CODE-BLOCK-END
*/
536 &Scoped-define SELF-NAME RP.Log4
537 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Log4 V-table-Win
538 ON VALUE-CHANGED
OF RP.Log4
IN FRAME F-Main
/* Overdue tests
: */
540 RUN enable-appropriate-fields.
543 /* _UIB-CODE-BLOCK-END
*/
549 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK V-table-Win
552 /* *************************** Main Block
*************************** */
554 /* _UIB-CODE-BLOCK-END
*/
558 /* ********************** Internal Procedures
*********************** */
560 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available V-table-Win _ADM-ROW-AVAILABLE
561 PROCEDURE adm-row-available
:
562 /*------------------------------------------------------------------------------
563 Purpose
: Dispatched to this procedure when the Record-
564 Source has a new row available. This procedure
565 tries to get the new row
(or foriegn keys
) from
566 the Record-Source and process it.
568 ------------------------------------------------------------------------------*/
570 /* Define variables needed by this internal procedure.
*/
571 {src
/adm
/template
/row-head.i
}
573 /* Create a list of all the tables that we need to get.
*/
574 {src
/adm
/template
/row-list.i
"RP"}
576 /* Get the record
ROWID's from the RECORD-SOURCE.
*/
577 {src
/adm
/template
/row-get.i
}
579 /* FIND each record specified by the RECORD-SOURCE.
*/
580 {src
/adm
/template
/row-find.i
"RP"}
582 /* Process the newly available records
(i.e. display fields
,
583 open queries
, and
/or pass records on to any RECORD-TARGETS
).
*/
584 {src
/adm
/template
/row-end.i
}
588 /* _UIB-CODE-BLOCK-END
*/
591 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI V-table-Win _DEFAULT-DISABLE
592 PROCEDURE disable_UI
:
593 /*------------------------------------------------------------------------------
594 Purpose
: DISABLE the User Interface
596 Notes
: Here we clean-up the user-interface by deleting
597 dynamic widgets we have created and
/or hide
598 frames. This procedure is usually called when
599 we are ready to
"clean-up" after running.
600 ------------------------------------------------------------------------------*/
601 /* Hide all frames.
*/
603 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
606 /* _UIB-CODE-BLOCK-END
*/
609 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable-appropriate-fields V-table-Win
610 PROCEDURE enable-appropriate-fields
:
611 /*------------------------------------------------------------------------------
613 ------------------------------------------------------------------------------*/
614 DO WITH FRAME {&FRAME-NAME}:
615 IF INPUT RP.Log2
THEN
616 VIEW RP.Char2 btn_Browse .
618 HIDE RP.Char2 btn_Browse .
620 IF INPUT RP.Char3
= "PropertyRange" THEN DO:
621 HIDE cmb_ConsolidationList RP.Log7 .
622 VIEW RP.Int1 RP.Int2 fil_PropertyFrom fil_PropertyTo .
623 RUN set-link-attributes
IN sys-mgr
( THIS-PROCEDURE, STRING(fil_PropertyFrom
:HANDLE), "hidden = No" ).
624 RUN set-link-attributes
IN sys-mgr
( THIS-PROCEDURE, STRING(fil_PropertyTo
:HANDLE), "hidden = No" ).
626 ELSE IF INPUT RP.Char3
= "CompanyList" THEN DO:
627 HIDE RP.Int1 RP.Int2 fil_PropertyFrom fil_PropertyTo .
628 VIEW cmb_ConsolidationList RP.Log7.
629 RUN set-link-attributes
IN sys-mgr
( THIS-PROCEDURE, STRING(fil_PropertyFrom
:HANDLE), "hidden = Yes" ).
630 RUN set-link-attributes
IN sys-mgr
( THIS-PROCEDURE, STRING(fil_PropertyTo
:HANDLE), "hidden = Yes" ).
632 ELSE IF INPUT RP.Char3
= "AllCompanies" THEN DO:
633 HIDE RP.Int1 RP.Int2 fil_PropertyFrom fil_PropertyTo cmb_ConsolidationList .
635 RUN set-link-attributes
IN sys-mgr
( THIS-PROCEDURE, STRING(fil_PropertyFrom
:HANDLE), "hidden = Yes" ).
636 RUN set-link-attributes
IN sys-mgr
( THIS-PROCEDURE, STRING(fil_PropertyTo
:HANDLE), "hidden = Yes" ).
639 HIDE RP.Int1 RP.Int2 RP.Log7 fil_PropertyFrom fil_PropertyTo cmb_ConsolidationList .
640 RUN set-link-attributes
IN sys-mgr
( THIS-PROCEDURE, STRING(fil_PropertyFrom
:HANDLE), "hidden = Yes" ).
641 RUN set-link-attributes
IN sys-mgr
( THIS-PROCEDURE, STRING(fil_PropertyTo
:HANDLE), "hidden = Yes" ).
644 IF INPUT RP.Log4
THEN DO:
645 ENABLE RP.Int4 RP.Dec2 .
648 DISABLE RP.Int4 RP.Dec2 .
655 /* _UIB-CODE-BLOCK-END
*/
658 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-enable-fields V-table-Win
659 PROCEDURE inst-enable-fields
:
660 /*------------------------------------------------------------------------------
664 ------------------------------------------------------------------------------*/
666 RUN month-ending-changed.
670 /* _UIB-CODE-BLOCK-END
*/
673 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-initialize V-table-Win
674 PROCEDURE inst-initialize
:
675 /*------------------------------------------------------------------------------
679 ------------------------------------------------------------------------------*/
681 DEF VAR user-name
AS CHAR NO-UNDO.
683 RUN get-username
IN sys-mgr
( OUTPUT user-name
).
686 RP.UserName
= user-name
AND
687 RP.ReportID
= {&REPORT-ID} NO-ERROR.
689 IF NOT AVAILABLE RP
THEN
690 DO WITH FRAME {&FRAME-NAME}:
692 DEF VAR first-property
LIKE Property.PropertyCode
NO-UNDO INITIAL 0.
693 DEF VAR last-property
LIKE Property.PropertyCode
NO-UNDO INITIAL 99999.
695 FIND FIRST Property
NO-LOCK NO-ERROR.
696 IF AVAILABLE(Property
) THEN DO:
697 first-property
= Property.PropertyCode.
698 FIND LAST Property
NO-LOCK.
699 last-property
= Property.PropertyCode.
704 RP.ReportID
= {&REPORT-ID}
705 RP.UserName
= user-name
706 RP.Int1
= first-property
707 RP.Int2
= last-property.
710 RUN dispatch
( 'display-fields'
:U
).
711 RUN dispatch
( 'enable-fields'
:U
).
713 RUN enable-appropriate-fields.
717 /* _UIB-CODE-BLOCK-END
*/
720 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE month-ending-changed V-table-Win
721 PROCEDURE month-ending-changed
:
722 /*------------------------------------------------------------------------------
726 ------------------------------------------------------------------------------*/
728 DO WITH FRAME {&FRAME-NAME}:
729 cmb_month
:SENSITIVE = INPUT FRAME {&FRAME-NAME} RP.Char1 = 'MONTH':U.
734 /* _UIB-CODE-BLOCK-END
*/
737 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-destroy V-table-Win
738 PROCEDURE pre-destroy
:
739 /*------------------------------------------------------------------------------
743 ------------------------------------------------------------------------------*/
745 RUN check-modified
( "CLEAR" ).
749 /* _UIB-CODE-BLOCK-END
*/
752 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE run-report V-table-Win
753 PROCEDURE run-report
:
754 /*------------------------------------------------------------------------------
756 ------------------------------------------------------------------------------*/
757 DEF VAR report-options
AS CHAR NO-UNDO.
760 IF RETURN-VALUE = "FAIL" THEN RETURN.
762 RUN dispatch
( 'update-record'
:U
).
765 WHEN "PropertyRange" THEN
766 report-options
= "EntityRange,P," + STRING(RP.Int1
) + "," + STRING(RP.Int2
).
767 WHEN "AllProperties" THEN
768 report-options
= "EntityRange,P,0,99999".
769 WHEN "CompanyList" THEN
770 report-options
= "CompanyList," + RP.Char4.
771 WHEN "AllCompanies" THEN
772 report-options
= "EntityRange,L,0,99999".
775 report-options
= report-options
776 + (IF RP.Log1
THEN "~nSummary" ELSE "")
777 + (IF RP.Log2
THEN "~nExport," + RP.Char2
ELSE "")
778 + (IF RP.Log3
THEN "~nPreview" ELSE "")
779 + (IF RP.Log6
THEN "~nExcludeRent" ELSE "")
780 + (IF RP.Log5
THEN "~nMinDebitBalance," ELSE "~nMinAbsBalance,") + STRING( RP.Dec1
)
781 + (IF RP.Log7
AND RP.Char3
= "AllCompanies" THEN "~nNonProperty" ELSE "")
782 + (IF RP.Log7
AND RP.Char3
= "CompanyList" THEN "~nNonProperty" ELSE "")
783 + (IF RP.Log8
THEN "~nHideIgnored" ELSE "")
784 + (IF RP.Log4
THEN "~nOverduePeriods," + STRING(RP.Int4
) + "~nOverdueBalance," + STRING(RP.Dec2
) ELSE "")
785 + ("~nSort," + RP.Char5
)
786 + ("~nTenantOrder," + RP.Char6
)
787 + (IF RP.Char1
= "TODAY" THEN "" ELSE "~nAtMonthEnd," + STRING(RP.Int3
))
788 + (IF INPUT FRAME {&FRAME-NAME} tgl_NoOpenItems THEN "~nNoOpenItems" ELSE "")
791 RUN notify
( 'set-busy
, container-source'
:U
).
793 RUN process
/report
/tntagebl.p
( report-options
).
795 RUN make-bq-entry
IN sys-mgr
( "process/report/tntagebl.p", report-options
, ?
, ?
).
797 RUN notify
( 'set-idle
, container-source'
:U
).
801 /* _UIB-CODE-BLOCK-END
*/
804 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE select-file-dialog V-table-Win
805 PROCEDURE select-file-dialog
:
806 /*------------------------------------------------------------------------------
808 ------------------------------------------------------------------------------*/
809 DEF VAR select-ok
AS LOGICAL INITIAL Yes
NO-UNDO.
810 DEF VAR file-name
AS CHAR NO-UNDO.
811 DEF VAR start-dir
AS CHAR NO-UNDO.
813 file-name
= INPUT FRAME {&FRAME-NAME} RP.Char2 .
814 start-dir
= SUBSTRING( file-name
, 1, R-INDEX(file-name
, "\" ) ).
816 SYSTEM-DIALOG GET-FILE file-name
FILTERS "Comma-separated values" "*.CSV"
817 SAVE-AS ASK-OVERWRITE CREATE-TEST-FILE DEFAULT-EXTENSION ".CSV"
818 INITIAL-DIR start-dir
RETURN-TO-START-DIR
819 TITLE "" USE-FILENAME UPDATE select-ok.
821 IF select-ok
THEN DO:
822 IF SUBSTRING( file-name
, R-INDEX( file-name
, ".") ) <> ".CSV" THEN DO:
823 IF (LENGTH( file-name
) - R-INDEX( file-name
, "." )) < 4 THEN
824 file-name
= SUBSTRING( file-name
, 1, R-INDEX( file-name
, ".")) + "CSV" .
826 RP.Char2
:SCREEN-VALUE IN FRAME {&FRAME-NAME} = file-name.
831 /* _UIB-CODE-BLOCK-END
*/
834 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records V-table-Win _ADM-SEND-RECORDS
835 PROCEDURE send-records
:
836 /*------------------------------------------------------------------------------
837 Purpose
: Send record
ROWID's for all tables used by
839 Parameters
: see template
/snd-head.i
840 ------------------------------------------------------------------------------*/
842 /* Define variables needed by this internal procedure.
*/
843 {src
/adm
/template
/snd-head.i
}
845 /* For each requested table
, put it's
ROWID in the output list.
*/
846 {src
/adm
/template
/snd-list.i
"RP"}
848 /* Deal with any unexpected table requests before closing.
*/
849 {src
/adm
/template
/snd-end.i
}
853 /* _UIB-CODE-BLOCK-END
*/
856 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed V-table-Win
857 PROCEDURE state-changed
:
858 /* -----------------------------------------------------------
862 -------------------------------------------------------------*/
863 DEFINE INPUT PARAMETER p-issuer-hdl
AS HANDLE NO-UNDO.
864 DEFINE INPUT PARAMETER p-state
AS CHARACTER NO-UNDO.
867 /* Object instance CASEs can go here to replace standard behavior
869 {src
/adm
/template
/vstates.i
}
873 /* _UIB-CODE-BLOCK-END
*/
876 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE verify-report V-table-Win
877 PROCEDURE verify-report
:
878 /*------------------------------------------------------------------------------
882 ------------------------------------------------------------------------------*/
884 IF INPUT FRAME {&FRAME-NAME} RP.Int1 >
885 INPUT FRAME {&FRAME-NAME} RP.Int2 THEN
887 MESSAGE "The TO property must be greater than the from property !"
888 VIEW-AS ALERT-BOX ERROR.
889 APPLY '
ENTRY'
:U
TO RP.Int1
IN FRAME {&FRAME-NAME}.
893 IF INPUT FRAME {&FRAME-NAME} RP.Char1 = "MONTH" AND
894 ( cmb_month
:SCREEN-VALUE = "" OR cmb_month
:SCREEN-VALUE = ?
) THEN
896 MESSAGE "You must select a month" VIEW-AS ALERT-BOX ERROR.
897 APPLY '
ENTRY'
:U
TO cmb_month
IN FRAME {&FRAME-NAME}.
903 /* _UIB-CODE-BLOCK-END
*/