Modifications to custreports.4gl
The MAIN
program block has been modified to open a window containing
the form with a PROGRESSBAR
and a MENU
, to allow the user
to start the report and to exit. A new function, cust_report
, is added for
interruption handling. The report definition, the cust_list REPORT
block,
remains the same as in the previous example.
Changes to the
MAIN
program block
(custreport2.4gl):01
MAIN
02
03
DEFER INTERRUPT
04
CONNECT TO
"custdemo"
05
CLOSE WINDOW SCREEN
06
OPEN WINDOW
w3 WITH FORM
"reportprog"
07
08
MENU
"Reports"
09
ON ACTION
start
10
MESSAGE
"Report starting"
11
CALL
cust_report()
12
ON ACTION
exit
13
EXIT MENU
14
END MENU
15
16
CLOSE WINDOW
w3
17
DISCONNECT CURRENT
18
19
END MAIN
Note:
- Line
03
prevents the user from interrupting the program except by using theinterrupt
action view. - Line
06
Opens the window and form containing thePROGRESSBAR
. - Lines
08
thru14
define aMENU
with two actions:- start- displays a
MESSAGE
and calls the functioncust_report
- exit - quits the
MENU
- start- displays a