Format bloka REPORT. (Generaciya otchetov).
REPORT report-name (argument-list)
DEFINE variable-list { type | LIKE table-column |
RECORD { LIKE table.* | variable-list type [,...]
END RECORD } }[,...]
[OUTPUT po umolchaniyu:
[REPORT TO { "filename | PIPE "program" | PRINTER } ]
SCREEN
[ LEFT MARGIN integer ] 5
[ RIGHT MARGIN integer ] 132
[ TOP MARGIN integer ] 3
[ BOTTOM MARGIN integer ] 3
[ PAGE LENGTH integer ] 66
]
[ORDER [EXTERNAL] BY sort-list ] podspisok peremennyh,
vhodyashchih v argumenty
FORMAT EVERY ROW prostejshij operator formata.
V etom sluchae nel'zya ispol'zovat' kontrol'nye bloki.
libo
FORMAT vklyuchaet neskol'ko kontrol'nyh blokov, kotorye soderzhat
obychnye operatory 4GL i operatory primenimye tol'ko v REPORT
ON EVERY ROW vyvodit stroku
statement
. . .
FIRST PAGE HEADER vyvodit zagolovok pervoj stranicy
statement
. . .
ON LAST ROW okonchanie REPORT (podvedenie itogov)
statement
. . .
PAGE HEADER zagolovok kazhdoj stranicy
statement
. . .
PAGE TRAILER v konce kazhdoj stranicy
statement
. . .
BEFORE GROUP OF variable v nachale gruppy strok
statement
. . .
. . .
AFTER GROUP OF variable v konce gruppy strok
statement
. . .
. . .
END REPORT
ннннннннннннннннннннннннннннннннннннннннннннннннннннннннннннннн
v kontrol'nyh blokah krome obychnyh operatorov 4GL ispol'zuyutsya:
NEED num-expr LINES esli na stranice ostalos' menee
expr strok, to nachat' s novoj stranicy.
PAUSE ["Soobshchenie"] vyvesti Soobshchenie na ekran
i zhdat' nazhatiya CR
PRINT FILE "filename" vyvesti na pechat' soderzhimoe fajla
SKIP { integer LINE | TO TOP OF PAGE }
PRINT spisok vyrazhenij [;]
vyvesti na pechat' [ne perevodya stroku]
v REPORT mozhno ispol'zovat' sleduyushchie funkcii:
num-expr SPACES vstavit' probely
char-exp WORDWRAP [RIGHT MARGIN integer] vyvesti dlinnuyu stroku
LINENO nomer stroki na stranice
PAGENO nomer pechataemoj stranicy
[GROUP] functiop [WHERE uslovie]
[dlya gruppy strok] primenit' funkciyu [tol'ko dlya strok,
udovletvoryayushchih usloviyu]
gde functiop mozhet byt':
{ COUNT(*) | PERCENT(*) | { SUM | MAX | MIN | AVG }(expr) }
v procentah ot srednee
obshchego kol-va strok
Obychnye funkcii 4GL (sm. fajl h4fu)
Last-modified: Tue, 25 Nov 1997 07:26:01 GMT