[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: To Break or not to Break
- Subject: Re: To Break or not to Break
- From: Brian Nice <bnice@CCCI.ORG>
- Date: Fri, 7 May 1999 14:46:04 -0400
Norm,
I believe you can take the on-break statement and move it to a print statement
after the
select column. So you would have something like:
begin-SELECT
A.Company
!--Check for break manualy and print if this is how the user wants it
if &A.company <> $previousCompany and $Plans_selected = 'ALL'
print () on-break level=1 procedure=Company-change
end-if
C.DeptID
if &C.deptID <> $previousDeptID and $Plans_selected = 'ALL'
print () on-break level=2 procedure=Dept-Change
end-if
A.Emplid
I haven't actually tried this, but I think it will work
Brian
>>> Norm Schwartzman <norm_schwartzman@ISMBC.COM> 05/07/99 02:28PM >>>
I have a little dilemna and I hope someone can help me. The end user would like
an option to have a report not sort by department. I
know how to get around the order by part but I'm not sure what to do about the
on-break processing. I would like to make the on-break dynamic. Attached is the
code. Any help would be much appreciated. I am using SQR V3.013.3.
Thanks
Norm
! check if all Plans (ie: not sort by department)
if $Plans_Selected = 'ALL'
let $Order_By = 'ORDER BY A.COMPANY, C.DEPTID, B.Name, A.EMPLID,
A.PLAN_TYPE'
else
let $Order_By = 'ORDER BY A.COMPANY, B.Name, A.EMPLID, A.PLAN_TYPE'
end-if
begin-SELECT
A.COMPANY () on-break print=never level=1 procedure=Company-Change
C.DEPTID () on-break print=never level=2 procedure=Dept-Change
A.EMPLID,
...
FROM PS_LEAVE_ACCRUAL A,
PS_PERSONAL_DATA B,
PS_JOB C,
PS_LEAVE_PLAN D,
PS_Employment E,
PS_Benef_Plan_Tbl F
WHERE ......
[$Order_By]
end-SELECT