[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

ON-BREAK processing



Hello all. Has anyone encountered the following:

I have a fairly standard select paragraph:

begin-select
a.break1
a.break2
b.name
<etc.>

   If $parm_hardcopy = 'Y'

      Print &a.acad_prog_primary on-break level=1 print=never
before=before-1 after=after-1

      If $parm_break = '2'
         #debuga display ' about to print break 2'
         Print &a.acad_plan on-break level=2 print=never before=before-2
after=after-2
      End-If

   End-If

from ps_table_1 A, ps_table_2 B, <etc.>

Situation 1:
$parm_hardcopy = 'Y'
$parm_break = '1'

Procedure before-1 executes (as expected), but procedure before-2 also
executes!
And, procedure after-1 executes (as expected), but procedure after-2 also
executes!


Situation 2:
$parm_hardcopy = 'N'
$parm_break = '1'

All four before and after procedures execute once each. (The before
procedures execute just before the first row is selected and the after
procedures execute after the last row has been selected)

The funny thing is that in either situation, the debug statement immediately
following the inner if is never found in the sqr.log file. What gives?


TIA,
Ed

Edward Fong
University of Alberta - OASIS Project
Phone: (780) 492-5376
Fax: (780) 492-2371
ed.fong@ualberta.ca