1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r11
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
5 ------------------------------------------------------------------------*/
7 DEF VAR report-options
AS CHAR NO-UNDO INITIAL "".
8 DEF VAR preview
AS LOGICAL NO-UNDO INITIAL Yes.
11 DEF VAR prt-ctrl
AS CHAR NO-UNDO.
12 DEF VAR cols
AS INT NO-UNDO.
13 DEF VAR rows
AS INT NO-UNDO.
14 DEF VAR user-name
AS CHAR NO-UNDO.
15 {inc
/username.i
"user-name"}
19 &SCOPED-DEFINE page-width 126
20 &SCOPED-DEFINE with-clause NO-BOX USE-TEXT NO-LABELS WIDTH {&page-width}
22 DEF VAR timeStamp
AS CHAR FORMAT "X(44)" NO-UNDO.
23 timeStamp
= STRING( TODAY, "99/99/9999") + ", " + STRING( TIME, "HH:MM:SS") + " for " + user-name.
24 DEF VAR hline2
AS CHAR FORMAT "X({&page-width})" NO-UNDO.
25 DEF VAR hline3
AS CHAR FORMAT "X({&page-width})" NO-UNDO.
26 hline2
= "Tenant Legal Names".
27 hline2
= SUBSTRING( STRING("","X({&page-width})"), 1, INTEGER(({&page-width} - LENGTH(hline2) ) / 2)) + hline2.
29 hline3
= SUBSTRING( STRING("","X({&page-width})"), 1, INTEGER(({&page-width} - LENGTH(hline3) ) / 2)) + hline3.
31 DEFINE FRAME heading-frame
WITH 1 DOWN {&with-clause} PAGE-TOP.
33 timeStamp
"Page " + STRING( PAGE-NUMBER ) TO {&page-width} SKIP (1)
34 hline2
FORMAT "X({&page-width})"
35 hline3
FORMAT "X({&page-width})"
37 WITH FRAME heading-frame.
39 DEF VAR name-type
AS CHAR FORMAT "X(3):" NO-UNDO.
40 DEFINE FRAME listing-frame
WITH DOWN {&with-clause}.
42 " " name-type Tenant.Name
43 WITH FRAME listing-frame.
45 /* $History
: lglnam.P $
47 * ***************** Version
5 *****************
48 * User
: Andrew Date
: 22/12/97 Time
: 14:49
49 * Updated in $
/PROCESS/REPORT
50 * Should only check in a couple of items
- let's see
!
52 * ***************** Version
4 *****************
53 * User
: Andrew Date
: 22/12/97 Time
: 9:44
54 * Updated in $
/PROCESS/REPORT
55 * Testing new SS version
57 * ***************** Version
3 *****************
58 * User
: Andrew Date
: 19/12/97 Time
: 10:46
59 * Updated in $
/PROCESS/REPORT
60 * Sending an update to OZ and to Auckland
62 * ***************** Version
2 *****************
63 * User
: Andrew Date
: 26/05/97 Time
: 21:49
64 * Updated in $
/PROCESS/REPORT
65 * Finished for the night
67 * ***************** Version
1 *****************
68 * User
: Andrew Date
: 14/04/97 Time
: 10:50
69 * Created in $
/PROCESS/REPORT
71 * ***************** Version
9 *****************
72 * User
: Andrew Date
: 28/03/97 Time
: 17:27
73 * Updated in $
/PROCESS/REPORT
76 /* _UIB-CODE-BLOCK-END
*/
80 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
82 /* ******************** Preprocessor Definitions
******************** */
84 &Scoped-define PROCEDURE-TYPE Procedure
88 /* _UIB-PREPROCESSOR-BLOCK-END
*/
93 /* *********************** Procedure Settings
************************ */
95 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
96 /* Settings for
THIS-PROCEDURE
100 Add Fields to
: Neither
101 Other Settings
: CODE-ONLY
COMPILE
103 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
105 /* ************************* Create Window
************************** */
107 &ANALYZE-SUSPEND _CREATE-WINDOW
108 /* DESIGN Window definition
(used by the UIB
)
109 CREATE WINDOW Procedure
ASSIGN
117 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Procedure
118 /* ************************* Included-Libraries
*********************** */
120 {inc
/method
/m-txtrep.i
}
122 /* _UIB-CODE-BLOCK-END
*/
127 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
130 /* *************************** Main Block
*************************** */
132 RUN make-control-string
( "PCL", "reset,portrait,tm,2,a4,lm,6,courier,cpi,18,lpi,9",
133 OUTPUT prt-ctrl
, OUTPUT rows
, OUTPUT cols
).
135 RUN output-control-file
( prt-ctrl
).
136 OUTPUT TO VALUE(txtrep-print-file
) KEEP-MESSAGES PAGE-SIZE VALUE(rows
).
138 DEF VAR first-time
AS LOGICAL INITIAL Yes
NO-UNDO.
140 FOR EACH Property
WHERE Property.Active
NO-LOCK
141 BREAK BY Property.Administrator
142 BY Property.ShortName
:
143 IF FIRST-OF(Property.Administrator
) THEN DO:
144 FIND Person
WHERE Person.PersonCode
= Property.Administrator
NO-LOCK NO-ERROR.
145 IF AVAILABLE(Person
) THEN
146 hline3
= Person.FirstName
+ " " + Person.LastName.
148 hline3
= "Person not on file".
149 hline3
= SUBSTRING( STRING("","X({&page-width})"), 1, INTEGER(({&page-width} - LENGTH(hline3) ) / 2)) + hline3.
150 IF NOT first-time
THEN
153 VIEW FRAME heading-frame.
157 STRING( Property.PropertyCode
, "99999") + " "
158 STRING( Property.ShortName
, "X(12)")
161 FOR EACH Tenant
NO-LOCK WHERE Tenant.Active
AND Tenant.EntityType
= "P"
162 AND Tenant.EntityCode
= Property.PropertyCode
163 AND CAN-FIND( FIRST TenancyLease
OF Tenant
WHERE TenancyLease.LeaseStatus
<> "PAST")
165 DISPLAY "Lgl" @ name-type Tenant.Name
WITH FRAME listing-frame.
166 DOWN WITH FRAME listing-frame.
167 DISPLAY "T/A" @ name-type Tenant.LegalName @ Tenant.Name
WITH FRAME listing-frame.
168 DOWN WITH FRAME listing-frame.
175 RUN view-output-file
( preview
).
177 /* _UIB-CODE-BLOCK-END
*/