Add blank column, rename column.
[capital-apms-progress.git] / process / report / rntlarea.p
blobb1f79670c25a8209a67bd4882cda1e3d5339f90c
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
2 &ANALYZE-RESUME
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
5 File :
6 Purpose :
8 Syntax :
10 Description :
12 Author(s) :
13 Created :
14 Notes :
15 ------------------------------------------------------------------------*/
16 /* This .W file was created with the Progress UIB. */
17 /*----------------------------------------------------------------------*/
19 /* *************************** Definitions ************************** */
21 &SCOPED-DEFINE lines-per-page 112
23 /* Report counters */
24 DEF VAR ln AS DEC INIT 0.00 NO-UNDO.
26 /* Line definitions */
28 DEF VAR trn-line AS CHAR NO-UNDO.
29 DEF VAR trn-no AS INT NO-UNDO.
31 DEF VAR reset-page AS CHAR NO-UNDO.
32 DEF VAR half-line AS CHAR NO-UNDO. half-line = CHR(27) + "=".
33 DEF VAR title-font AS CHAR NO-UNDO.
34 DEF VAR time-font AS CHAR NO-UNDO.
35 DEF VAR type-font AS CHAR NO-UNDO.
36 DEF VAR property-font AS CHAR NO-UNDO.
37 DEF VAR line-printer AS CHAR NO-UNDO.
38 DEF VAR area-fmt AS CHAR INIT ">>>,>>9.99" NO-UNDO.
39 DEF VAR prk-fmt AS CHAR INIT ">>>>>>>9" NO-UNDO.
40 DEF VAR tnt-fmt AS CHAR INIT ">>>,>>9" NO-UNDO.
41 DEF VAR tot-fmt AS CHAR INIT ">,>>>,>>9.99" NO-UNDO.
43 DEF VAR i AS INT NO-UNDO.
45 DEF VAR region-name AS CHAR NO-UNDO.
46 DEF VAR curr-region AS CHAR NO-UNDO.
47 DEF VAR curr-type AS CHAR NO-UNDO.
49 DEF VAR prp-tot AS DEC EXTENT 8 NO-UNDO.
50 DEF VAR typ-tot AS DEC EXTENT 8 NO-UNDO.
51 DEF VAR reg-tot AS DEC EXTENT 8 NO-UNDO.
52 DEF VAR grd-tot AS DEC EXTENT 8 NO-UNDO.
54 DEF VAR tenant-list AS CHAR NO-UNDO.
56 /* _UIB-CODE-BLOCK-END */
57 &ANALYZE-RESUME
60 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
62 /* ******************** Preprocessor Definitions ******************** */
64 &Scoped-define PROCEDURE-TYPE Procedure
68 /* _UIB-PREPROCESSOR-BLOCK-END */
69 &ANALYZE-RESUME
73 /* *********************** Procedure Settings ************************ */
75 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
76 /* Settings for THIS-PROCEDURE
77 Type: Procedure
78 Allow:
79 Frames: 0
80 Add Fields to: Neither
81 Other Settings: CODE-ONLY COMPILE
83 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
85 /* ************************* Create Window ************************** */
87 &ANALYZE-SUSPEND _CREATE-WINDOW
88 /* DESIGN Window definition (used by the UIB)
89 CREATE WINDOW Procedure ASSIGN
90 HEIGHT = .08
91 WIDTH = 40.
92 /* END WINDOW DEFINITION */
94 &ANALYZE-RESUME
98 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Procedure
99 /* ************************* Included-Libraries *********************** */
101 {inc/method/m-txtrep.i}
102 {inc/convert.i}
104 /* _UIB-CODE-BLOCK-END */
105 &ANALYZE-RESUME
109 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
112 /* *************************** Main Block *************************** */
114 OUTPUT TO VALUE(txtrep-print-file) KEEP-MESSAGES PAGE-SIZE 0.
116 RUN rental-area-breakdown.
118 OUTPUT CLOSE.
119 RUN view-output-file ( no ).
121 /* _UIB-CODE-BLOCK-END */
122 &ANALYZE-RESUME
125 /* ********************** Internal Procedures *********************** */
127 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE carriage-return Procedure
128 PROCEDURE carriage-return :
129 /*------------------------------------------------------------------------------
130 Purpose:
131 Parameters: <none>
132 Notes:
133 ------------------------------------------------------------------------------*/
135 PUT CONTROL CHR(13).
137 END PROCEDURE.
139 /* _UIB-CODE-BLOCK-END */
140 &ANALYZE-RESUME
143 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE check-line Procedure
144 PROCEDURE check-line :
145 /*------------------------------------------------------------------------------
146 Purpose:
147 Parameters: <none>
148 Notes:
149 ------------------------------------------------------------------------------*/
151 IF ln >= {&lines-per-page} THEN
153 RUN page-feed.
154 RUN page-header.
155 END.
157 END PROCEDURE.
159 /* _UIB-CODE-BLOCK-END */
160 &ANALYZE-RESUME
163 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE check-next-group Procedure
164 PROCEDURE check-next-group :
165 /*------------------------------------------------------------------------------
166 Purpose:
167 Parameters: <none>
168 Notes:
169 ------------------------------------------------------------------------------*/
171 CASE Property.Region:
172 WHEN "akld" THEN region-name = "Auckland".
173 WHEN "wgtn" THEN region-name = "Wellington".
174 WHEN "rot" THEN region-name = "Rotorua".
175 WHEN "chch" THEN region-name = "Christchurch".
176 WHEN "ham" THEN region-name = "Hamilton".
177 WHEN "ZZZZ" THEN region-name = "Sundry".
178 OTHERWISE DO:
179 region-name = CAPS( Property.Region ) + " Buildings".
180 END.
181 END.
183 IF region-name <> curr-region OR
184 Property.BuildingType <> curr-type THEN
186 IF curr-type <> "" THEN
187 RUN type-footer.
189 IF region-name <> curr-region AND
190 curr-region <> "" THEN
191 RUN region-footer.
193 RUN type-header.
195 curr-region = region-name.
196 curr-type = Property.BuildingType.
198 END.
200 END PROCEDURE.
202 /* _UIB-CODE-BLOCK-END */
203 &ANALYZE-RESUME
206 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE column-header Procedure
207 PROCEDURE column-header :
208 /*------------------------------------------------------------------------------
209 Purpose:
210 Parameters: <none>
211 Notes:
212 ------------------------------------------------------------------------------*/
214 RUN skip-line(2).
215 PUT UNFORMATTED
216 STRING( "BUILDING", "X(23)" ) SPACE(2)
217 STRING( " RETAIL", "X(10)" ) SPACE(2)
218 STRING( " WAREHOUSE", "X(10)" ) SPACE(2)
219 STRING( " FACTORY", "X(10)" ) SPACE(2)
220 STRING( " OTHER", "X(10)" ) SPACE(2)
221 STRING( " OFFICE", "X(10)" ) SPACE(2)
222 STRING( "CARPARKS", "X(8)" ) SPACE(2)
223 STRING( "TENANTS", "X(7)" ) SPACE(2)
224 STRING( " TOTAL", "X(12)" ).
225 RUN skip-line(2).
227 END PROCEDURE.
229 /* _UIB-CODE-BLOCK-END */
230 &ANALYZE-RESUME
233 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE each-property Procedure
234 PROCEDURE each-property :
235 /*------------------------------------------------------------------------------
236 Purpose:
237 Parameters: <none>
238 Notes:
239 ------------------------------------------------------------------------------*/
241 IF NOT CAN-FIND ( FIRST BuildingType WHERE
242 BuildingType.BuildingType = Property.BuildingType ) THEN RETURN.
243 RUN check-next-group.
245 FOR EACH RentalSpace OF Property NO-LOCK.
246 RUN update-prp-totals.
247 END.
249 RUN property-line.
251 END PROCEDURE.
253 /* _UIB-CODE-BLOCK-END */
254 &ANALYZE-RESUME
257 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-control-strings Procedure
258 PROCEDURE get-control-strings :
259 /*------------------------------------------------------------------------------
260 Purpose: Get all control strings for this report
261 Parameters: <none>
262 Notes:
263 ------------------------------------------------------------------------------*/
265 DEF VAR rows AS DEC NO-UNDO.
266 DEF VAR cols AS DEC NO-UNDO.
268 RUN make-control-string ( "PCL", "reset,portrait,a4,tm,0,lm,1",
269 OUTPUT reset-page, OUTPUT rows, OUTPUT cols ).
271 RUN make-control-string ( "PCL", "Proportional,Helvetica,Bold,Point,12",
272 OUTPUT title-font, OUTPUT rows, OUTPUT cols ).
274 RUN make-control-string ( "PCL", "Proportional,Helvetica,Bold,Point,6",
275 OUTPUT time-font, OUTPUT rows, OUTPUT cols ).
277 RUN make-control-string ( "PCL", "Proportional,Helvetica,Bold,Point,10",
278 OUTPUT type-font, OUTPUT rows, OUTPUT cols ).
280 RUN make-control-string ( "PCL", "LinePrinter,lpi,9.54",
281 OUTPUT line-printer, OUTPUT rows, OUTPUT cols ).
283 END PROCEDURE.
285 /* _UIB-CODE-BLOCK-END */
286 &ANALYZE-RESUME
289 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE grand-total Procedure
290 PROCEDURE grand-total :
291 /*------------------------------------------------------------------------------
292 Purpose:
293 Parameters: <none>
294 Notes:
295 ------------------------------------------------------------------------------*/
297 DEF VAR i AS INT NO-UNDO.
299 RUN separator-line.
300 PUT UNFORMATTED
301 STRING( "GRAND TOTAL", "X(25)" ).
302 DO i = 1 TO 8:
303 PUT UNFORMATTED
304 STRING( grd-tot[i],
305 IF i = 6 THEN prk-fmt ELSE
306 IF i = 7 THEN tnt-fmt ELSE
307 IF i = 8 THEN tot-fmt ELSE area-fmt )
308 SPACE(2).
309 END.
311 END PROCEDURE.
313 /* _UIB-CODE-BLOCK-END */
314 &ANALYZE-RESUME
317 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE page-feed Procedure
318 PROCEDURE page-feed :
319 /*------------------------------------------------------------------------------
320 Purpose:
321 Parameters: <none>
322 Notes:
323 ------------------------------------------------------------------------------*/
325 PUT CONTROL CHR(12).
327 END PROCEDURE.
329 /* _UIB-CODE-BLOCK-END */
330 &ANALYZE-RESUME
333 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE page-header Procedure
334 PROCEDURE page-header :
335 /*------------------------------------------------------------------------------
336 Purpose:
337 Parameters: <none>
338 Notes:
339 ------------------------------------------------------------------------------*/
341 RUN reset-page.
342 RUN print-title.
343 RUN column-header.
345 END PROCEDURE.
347 /* _UIB-CODE-BLOCK-END */
348 &ANALYZE-RESUME
351 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE print-title Procedure
352 PROCEDURE print-title :
353 /*------------------------------------------------------------------------------
354 Purpose:
355 Parameters: <none>
356 Notes:
357 ------------------------------------------------------------------------------*/
358 DEF VAR user-name AS CHAR NO-UNDO.
359 {inc/username.i "user-name"}
361 PUT CONTROL line-printer.
362 RUN skip-line(2).
363 PUT CONTROL time-font.
364 PUT UNFORMATTED
365 STRING(
366 "Printed: " + STRING( TODAY, "99/99/9999" ) + " " +
367 STRING( TIME, "HH:MM:SS" ) + " for " +
368 user-name,
369 "X(100)" ).
370 RUN skip-line(2).
371 PUT CONTROL title-font.
372 PUT UNFORMATTED SPACE(45) STRING( "Rental Area Breakdown", "X(50)" ).
373 RUN skip-line(1).
374 PUT CONTROL line-printer.
376 END PROCEDURE.
378 /* _UIB-CODE-BLOCK-END */
379 &ANALYZE-RESUME
382 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE property-line Procedure
383 PROCEDURE property-line :
384 /*------------------------------------------------------------------------------
385 Purpose:
386 Parameters: <none>
387 Notes:
388 ------------------------------------------------------------------------------*/
390 DEF VAR i AS INT NO-UNDO.
391 DEF VAR line-zero AS LOGI INIT Yes NO-UNDO.
393 DO i = 1 TO 8: line-zero = line-zero AND prp-tot[i] = 0.00. END.
394 IF line-zero THEN RETURN.
396 PUT UNFORMATTED
397 STRING( Property.Name, "X(23)" ) SPACE(2).
398 DO i = 1 TO 8:
399 PUT UNFORMATTED
400 STRING( prp-tot[i],
401 IF i = 6 THEN prk-fmt ELSE
402 IF i = 7 THEN tnt-fmt ELSE
403 IF i = 8 THEN tot-fmt ELSE area-fmt )
404 SPACE(2).
405 END.
407 RUN skip-line(1).
408 RUN update-typ-totals.
409 RUN reset-prp-totals.
411 END PROCEDURE.
413 /* _UIB-CODE-BLOCK-END */
414 &ANALYZE-RESUME
417 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE region-footer Procedure
418 PROCEDURE region-footer :
419 /*------------------------------------------------------------------------------
420 Purpose:
421 Parameters: <none>
422 Notes:
423 ------------------------------------------------------------------------------*/
425 DEF VAR i AS INT NO-UNDO.
427 RUN separator-line.
428 PUT UNFORMATTED
429 STRING( curr-region + " Total", "X(25)" ).
430 DO i = 1 TO 8:
431 PUT UNFORMATTED
432 STRING( reg-tot[i],
433 IF i = 6 THEN prk-fmt ELSE
434 IF i = 7 THEN tnt-fmt ELSE
435 IF i = 8 THEN tot-fmt ELSE area-fmt )
436 SPACE(2).
437 END.
439 RUN skip-line(4).
440 RUN update-grd-totals.
441 RUN reset-reg-totals.
443 END PROCEDURE.
445 /* _UIB-CODE-BLOCK-END */
446 &ANALYZE-RESUME
449 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE rental-area-breakdown Procedure
450 PROCEDURE rental-area-breakdown :
451 /*------------------------------------------------------------------------------
452 Purpose:
453 Parameters: <none>
454 Notes:
455 ------------------------------------------------------------------------------*/
457 RUN get-control-strings.
458 RUN page-header.
460 FOR EACH Property NO-LOCK WHERE Property.Active
461 BY Property.Region
462 BY Property.BuildingType
463 BY Property.Name:
464 RUN each-property.
465 END.
467 RUN type-footer.
468 RUN region-footer.
469 RUN grand-total.
470 RUN page-feed.
472 END PROCEDURE.
474 /* _UIB-CODE-BLOCK-END */
475 &ANALYZE-RESUME
478 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE reset-page Procedure
479 PROCEDURE reset-page :
480 /*------------------------------------------------------------------------------
481 Purpose:
482 Parameters: <none>
483 Notes:
484 ------------------------------------------------------------------------------*/
486 PUT CONTROL reset-page.
487 trn-no = 0.
488 ln = 0.
490 END PROCEDURE.
492 /* _UIB-CODE-BLOCK-END */
493 &ANALYZE-RESUME
496 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE reset-prp-totals Procedure
497 PROCEDURE reset-prp-totals :
498 /*------------------------------------------------------------------------------
499 Purpose:
500 Parameters: <none>
501 Notes:
502 ------------------------------------------------------------------------------*/
504 DEF VAR i AS INT NO-UNDO.
505 tenant-list = "".
506 DO i = 1 TO 8: prp-tot[i] = 0.00. END.
508 END PROCEDURE.
510 /* _UIB-CODE-BLOCK-END */
511 &ANALYZE-RESUME
514 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE reset-reg-totals Procedure
515 PROCEDURE reset-reg-totals :
516 /*------------------------------------------------------------------------------
517 Purpose:
518 Parameters: <none>
519 Notes:
520 ------------------------------------------------------------------------------*/
522 DEF VAR i AS INT NO-UNDO.
523 DO i = 1 TO 8: reg-tot[i] = 0.00. END.
525 END PROCEDURE.
527 /* _UIB-CODE-BLOCK-END */
528 &ANALYZE-RESUME
531 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE reset-typ-totals Procedure
532 PROCEDURE reset-typ-totals :
533 /*------------------------------------------------------------------------------
534 Purpose:
535 Parameters: <none>
536 Notes:
537 ------------------------------------------------------------------------------*/
539 DEF VAR i AS INT NO-UNDO.
540 DO i = 1 TO 8: typ-tot[i] = 0.00. END.
542 END PROCEDURE.
544 /* _UIB-CODE-BLOCK-END */
545 &ANALYZE-RESUME
548 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE separator-line Procedure
549 PROCEDURE separator-line :
550 /*------------------------------------------------------------------------------
551 Purpose:
552 Parameters: <none>
553 Notes:
554 ------------------------------------------------------------------------------*/
556 PUT UNFORMATTED SPACE(25)
557 FILL( "-", 10 ) SPACE(2)
558 FILL( "-", 10 ) SPACE(2)
559 FILL( "-", 10 ) SPACE(2)
560 FILL( "-", 10 ) SPACE(2)
561 FILL( "-", 10 ) SPACE(2)
562 FILL( "-", 8 ) SPACE(2)
563 FILL( "-", 7 ) SPACE(2)
564 FILL( "-", 12 ).
565 RUN skip-line(1).
567 END PROCEDURE.
569 /* _UIB-CODE-BLOCK-END */
570 &ANALYZE-RESUME
573 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE skip-line Procedure
574 PROCEDURE skip-line :
575 /*------------------------------------------------------------------------------
576 Purpose:
577 Parameters: <none>
578 Notes:
579 ------------------------------------------------------------------------------*/
581 DEF INPUT PARAMETER n AS DEC NO-UNDO.
583 IF ln + n >= {&lines-per-page} THEN
585 RUN page-feed.
586 RUN page-header.
587 END.
589 DEF VAR int-part AS INT NO-UNDO.
590 DEF VAR dec-part AS DEC NO-UNDO.
592 int-part = TRUNCATE( n, 0 ).
593 IF int-part < 0 THEN RETURN.
594 dec-part = n - int-part.
595 IF int-part = 0 AND dec-part = 0 THEN RETURN.
597 /* Need to have this like the following - do not touch */
598 IF int-part <> 0 THEN PUT CONTROL FILL( CHR(10), int-part ).
599 IF dec-part <> 0 THEN PUT CONTROL half-line.
601 ln = ln + n.
603 RUN carriage-return.
605 END PROCEDURE.
607 /* _UIB-CODE-BLOCK-END */
608 &ANALYZE-RESUME
611 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE skip-to-line Procedure
612 PROCEDURE skip-to-line :
613 /*------------------------------------------------------------------------------
614 Purpose:
615 Parameters: <none>
616 Notes:
617 ------------------------------------------------------------------------------*/
619 DEF INPUT PARAMETER line-no AS DEC NO-UNDO.
621 DEF VAR int-part AS INT NO-UNDO.
622 DEF VAR dec-part AS DEC NO-UNDO.
624 int-part = TRUNCATE( line-no - ln, 0 ).
625 IF int-part < 0 THEN RETURN.
626 dec-part = ( line-no - ln ) - int-part.
627 IF int-part = 0 AND dec-part = 0 THEN RETURN.
629 IF int-part <> 0 THEN PUT CONTROL FILL( CHR(10), int-part ).
630 IF dec-part <> 0 THEN PUT CONTROL half-line.
632 ln = line-no.
634 RUN carriage-return.
636 END PROCEDURE.
638 /* _UIB-CODE-BLOCK-END */
639 &ANALYZE-RESUME
642 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE type-footer Procedure
643 PROCEDURE type-footer :
644 /*------------------------------------------------------------------------------
645 Purpose:
646 Parameters: <none>
647 Notes:
648 ------------------------------------------------------------------------------*/
650 DEF VAR i AS INT NO-UNDO.
652 RUN separator-line.
653 PUT UNFORMATTED SPACE(25).
654 DO i = 1 TO 8:
655 PUT UNFORMATTED
656 STRING( typ-tot[i],
657 IF i = 6 THEN prk-fmt ELSE
658 IF i = 7 THEN tnt-fmt ELSE
659 IF i = 8 THEN tot-fmt ELSE area-fmt )
660 SPACE(2).
661 END.
663 RUN skip-line(3).
664 RUN update-reg-totals.
665 RUN reset-typ-totals.
667 END PROCEDURE.
669 /* _UIB-CODE-BLOCK-END */
670 &ANALYZE-RESUME
673 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE type-header Procedure
674 PROCEDURE type-header :
675 /*------------------------------------------------------------------------------
676 Purpose:
677 Parameters: <none>
678 Notes:
679 ------------------------------------------------------------------------------*/
681 FIND BuildingType WHERE BuildingType.BuildingType = Property.BuildingType NO-LOCK NO-ERROR.
683 PUT CONTROL type-font.
684 PUT UNFORMATTED region-name + " " + BuildingType.Description.
685 PUT CONTROL line-printer.
686 RUN skip-line(2).
688 END PROCEDURE.
690 /* _UIB-CODE-BLOCK-END */
691 &ANALYZE-RESUME
694 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE update-grd-totals Procedure
695 PROCEDURE update-grd-totals :
696 /*------------------------------------------------------------------------------
697 Purpose:
698 Parameters: <none>
699 Notes:
700 ------------------------------------------------------------------------------*/
702 DEF VAR i AS INT NO-UNDO.
703 DO i = 1 TO 8: grd-tot[i] = grd-tot[i] + reg-tot[i]. END.
705 END PROCEDURE.
707 /* _UIB-CODE-BLOCK-END */
708 &ANALYZE-RESUME
711 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE update-prp-totals Procedure
712 PROCEDURE update-prp-totals :
713 /*------------------------------------------------------------------------------
714 Purpose:
715 Parameters: <none>
716 Notes:
717 ------------------------------------------------------------------------------*/
719 DEF VAR i AS INT NO-UNDO.
720 CASE RentalSpace.AreaType:
721 WHEN 'R' THEN prp-tot[1] = prp-tot[1] + RentalSpace.AreaSize .
722 WHEN 'W' THEN prp-tot[2] = prp-tot[2] + RentalSpace.AreaSize .
723 WHEN 'F' THEN prp-tot[3] = prp-tot[3] + RentalSpace.AreaSize .
724 WHEN 'S' THEN prp-tot[4] = prp-tot[4] + RentalSpace.AreaSize .
725 WHEN 'A' THEN prp-tot[4] = prp-tot[4] + RentalSpace.AreaSize .
726 WHEN 'O' THEN prp-tot[5] = prp-tot[5] + RentalSpace.AreaSize .
727 WHEN 'C' THEN prp-tot[6] = prp-tot[6] + RentalSpace.AreaSize .
728 OTHERWISE DO:
729 IF RentalSpace.AreaSize > 1.5 THEN DO:
730 /* Assume that it's other if there's more than 1.5 of it! */
731 prp-tot[4] = prp-tot[4] + RentalSpace.AreaSize .
732 END.
733 END.
734 END.
736 IF RentalSpace.AreaStatus <> "V" THEN
738 FIND TenancyLease OF RentalSpace NO-LOCK NO-ERROR.
739 IF AVAILABLE TenancyLease AND TenancyLease.LeaseStatus <> "PAST" AND
740 CAN-FIND( FIRST Tenant WHERE
741 Tenant.Active AND Tenant.TenantCode = TenancyLease.TenantCode ) AND
742 LOOKUP( STRING( TenancyLease.TenantCode ), tenant-list ) = 0
743 THEN
745 tenant-list = tenant-list + IF tenant-list = "" THEN "" ELSE ",".
746 tenant-list = tenant-list + STRING( TenancyLease.TenantCode ).
747 prp-tot[7] = prp-tot[7] + 1.
748 END.
750 END.
752 IF LOOKUP( RentalSpace.AreaType, "R,W,F,S,O" ) <> 0 THEN
753 prp-tot[8] = prp-tot[8] + RentalSpace.AreaSize .
755 END PROCEDURE.
757 /* _UIB-CODE-BLOCK-END */
758 &ANALYZE-RESUME
761 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE update-reg-totals Procedure
762 PROCEDURE update-reg-totals :
763 /*------------------------------------------------------------------------------
764 Purpose:
765 Parameters: <none>
766 Notes:
767 ------------------------------------------------------------------------------*/
769 DEF VAR i AS INT NO-UNDO.
770 DO i = 1 TO 8: reg-tot[i] = reg-tot[i] + typ-tot[i]. END.
772 END PROCEDURE.
774 /* _UIB-CODE-BLOCK-END */
775 &ANALYZE-RESUME
778 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE update-typ-totals Procedure
779 PROCEDURE update-typ-totals :
780 /*------------------------------------------------------------------------------
781 Purpose:
782 Parameters: <none>
783 Notes:
784 ------------------------------------------------------------------------------*/
786 DEF VAR i AS INT NO-UNDO.
787 DO i = 1 TO 8: typ-tot[i] = typ-tot[i] + prp-tot[i]. END.
789 END PROCEDURE.
791 /* _UIB-CODE-BLOCK-END */
792 &ANALYZE-RESUME