[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
on-break processing
I have the select statement (below) with 2 break levels. What I am trying to
achieve is a report wherein the string: 'Transfer Credits logged out to:
' is printed prior to the value of break level 1 and the string: 'Program:
' is printed prior to the value of break level 2.
begin-procedure Main
begin-select DISTINCT
B.SQS_DESTINATION (,34) on-break level=1 print=change/top-page
before=Break1-Before
A.ACAD_PROG (,20) on-break level=2 before=Break2-before
A.SQS_APPLICATION_ID (+1,2)
A.EMPLID (,22)
C.NAME (,42)
B.SQS_ACTION_DATE (,62)
B.OPRID (,72)
FROM PS_SQS_APPLIC_REG A,
PS_SQS_APPLIC_TRAC B,
PS_PERSONAL_DATA C
WHERE B.SQS_APPLICATION_ID = A.SQS_APPLICATION_ID
AND C.EMPLID = A.EMPLID
AND B.SQS_APTRACK_ACTION = 'OUT'
AND B.SQS_DESTINATION <> 'STUDENT ADMIN'
AND B.SQS_ACTION_DATE =
(SELECT MAX(X.SQS_ACTION_DATE)
FROM PS_SQS_APPLIC_TRAC X
WHERE X.SQS_APPLICATION_ID = A.SQS_APPLICATION_ID)
order by B.SQS_DESTINATION, A.ACAD_PROG, A.SQS_APPLICATION_ID, A.EMPLID
end-select
end-procedure Main
begin-procedure Break1-Before
new-page
Print 'Transfer Credits logged out to: ' (,1)
end-procedure
begin-procedure Break2-Before
Print 'Program: ' (+1,1) !need to print DESCRIPTION after course - put in
select
end-procedure
I thought this would be a normal business type usage of this statement.
However, the output I get is:
Transfer Credits logged out to:
Program: ADEE COMMERCE
EX113 0100192 Exchange,Student 05-JAN-01 PS
Program: BBUS
EX115 0100202 Plan,Change 05-JAN-01 PS
EX15 0100192 Exchange,Student 08-JAN-01 PS
EX16 0100204 Fees,Cancel 08-JAN-01 PS
Program: DPHD
VV 0100193 Doctor,Study 02-JAN-01 PS
The problem is that 'COMMERCE ' is the level 1 variable b.SQS_DESTINATION
and it prints out on the same line as the level 2 variable and its string
viz. 'Program: ADEE'
I have tried heaps of things such as putting a minus 1 in the print
position, i.e.
B.SQS_DESTINATION (-1,34) on-break level=1 print=change/top-page
before=Break1-Before
but that actually makes the whole report go awry.
I have also tried concatenating the string and variable values for each
level and doing the break on those concatenated values, but that doesn't
give the desired output either.
Do I have totally the wrong impression of what this on-break feature is for?
Thanks
Fiona
Fiona Darroch
SA Team Member
IBIS
46 312628
Notebook.jpg