In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Viewer

One of the most common "Reader's Clinic" questions is "how to write reports which can page up/page down like RLIST in 1.1+". This feature is one of the most attractive recent features, and is so easy to use. In any program which sequentially processes records and/or prints lines to the monitor, the functionality of the VIEWER window can be invoked by simply includuing the lines CALL INIT.VIEW(n) and @VIEW.MODE - 1 where n is the width of screen required. Thus in a simple example program


0001           CALL INIT.VIEW(40)
0002           @VIEW.MODE = 1
0003           HEADING "Test Report 'LL'"
0004           FOR X = 1 TO 100
0005                PRINT "Testing INIT.VIEW"
0006           NEXT

Patrick Collins of Softsolve Computer Systems and I had some fun with this in trying to work out why the attribute settings seemed to go haywire when using this. The answer turned out to be very easy - the HEADING command must go after the setting of INIT.VIEW, not before. There still seems to be a problem with calling this sort of program as a subroutine though - we'll investigate this further and if we find a fix we'll document it later. The fix currently suggested by the support line at RevTech is "don't use it in subroutines" which has a certain logic to it, just execute the report program instead.

(Volume 1, Issue 6, Page 6)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel