tips:revmedia:v1i6a4

Viewer

Published ByDateVersionKnowledge LevelKeywords
Sprezzatura Ltd01 NOV 19891.1+EXPERTVIEWER, RLIST, INIT.VIEW, @VIEW.MODE, HEADING

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

       CALL INIT.VIEW(40)
       @VIEW.MODE = 1
       HEADING "Test Report 'LL'"
       FOR X = 1 TO 100
            PRINT "Testing INIT.VIEW"
       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)

  • tips/revmedia/v1i6a4.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1