[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: printing in 2 columns
- Subject: Re: printing in 2 columns
- From: Gary Lane <Gary.Lane@BELL-ATL.COM>
- Date: Wed, 12 Nov 1997 07:40:52 -0500
- Organization: Bell Atlantic
Aaron,
An easy way to accomplish this is by using the COLUMNS command. The following generates a report
with three columns. The names are listed in alphabetic order down the first column and then
continuing with the next column and so on.
!**************************************************************************
! *
! PROCEDURE: 3000-PROCESS-EMPLOYEES *
! *
! PURPOSE: THIS PROCEDURE RETRIEVES EACH EMPLOYEE WITH A TAX ALLOWANCE *
! APPLICATION ON FILE FOR THE CURRENT TAX YEAR. *
! *
!**************************************************************************
BEGIN-PROCEDURE 3000-PROCESS-EMPLOYEES
COLUMNS 4 58 112
BEGIN-SELECT
'__' (+1, 1, 0)
PD.NAME (+0,+1,30)
T.EMPLID (+0,+2, 0)
ADD 1 TO #TOTAL_TAX_ALLOWANCE_APPLICATIONS
IF #CURRENT-LINE >= #MAX_LINES_PER_PAGE !MAX_LINES_PER_PAGE = 55
NEXT-COLUMN GOTO-TOP=1 AT-END=NEWPAGE
END-IF
FROM PS_IMF_TAX_EMPL T, PS_PERSONAL_DATA PD
WHERE T.EMPLID = PD.EMPLID
AND T.EFF_TAX_YR = &A.EFF_TAX_YR
AND T.IMF_TAX_APP_TYPE = $IMF_TAX_APP_TYPE
AND T.QTRCD = (SELECT MAX(T1.QTRCD) FROM PS_IMF_TAX_EMPL T1
WHERE T1.EMPLID = T.EMPLID
AND T1.IMF_TAX_APP_TYPE = T.IMF_TAX_APP_TYPE
AND T1.EFF_TAX_YR = T.EFF_TAX_YR
AND T1.QTRCD <= &A.QTRCD)
ORDER BY PD.NAME
END-SELECT
END-PROCEDURE
Hope this helps!
Gary