[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Column Headings Appearing Above level 1 break field print
- Subject: Column Headings Appearing Above level 1 break field print
- From: Jenny Mckeon <MCKEON@SHANDS.UFL.EDU>
- Date: Wed, 12 Jul 2000 17:19:05 -0400
In my recently written report, I want the column headings to appear under the
department name. I am page breaking on Department, and it's my level 1 control
break, so I don't see how in the world the column names are managing to come
out on top, but they are.
So the output looks like this:
JOBCODE POSITION TITLE NAME EMPLID STATUS FTE ect.
Department: 123456 AnyDeptName
99999999 Unit Clerk Smith,Joe 12345 A
1.0
What would cause this mixed up sequencing of report lines ?
Code is attached. Any suggestions would be greatly appreciated.
If this is an easy one I appologize (it's my first SQR program written from
scratch)
Jenny Mckeon
Shands Healthcare, Info. Svcs.
Application Systems Analyst, Senior
(352) 395-0680, ext. 8-5232
internet:mckeon@shands.ufl.edu
!*********************************
! linrpt02: Turnover analysis *
!*********************************
!***********************************************************************
#include 'setenv.sqc' !Set environment
#Include 'setup32.sqc' !Printer and page-size initialization
begin-heading 8
let $Reporttitle = 'TURNOVER Test Report'
#Include 'stdhtr08.sqc'
! print 'DEPARTMENT' (+1,1)
print 'Budgt.' (+1,78)
print 'Actual' (,83)
print 'Transfer' (,103,8)
print 'Transfered' (,91,10)
print 'Jobcode' (+1,1)
print 'Position Title' (0,10)
print 'Name' (0,35,
print 'Empl ID' (0,61,10)
print 'Status' (0,72)
print 'FTE' (,78)
print 'FTE' (,84)
print ' To Dept:' (,92,9)
print 'Date' (,105)
print 'Action' (,116,6)
print 'Supervisor'(,123)
end-heading
!********************************************
begin-procedure Init-Report
MOVE 'RNRPT01' TO $REPORTID
do Stdapi-Init
let $fromdate = '2000-06-01'
let $thrudate = '2000-06-30'
if $prcs_process_instance = ''
do Ask-As-Of-Date
else
do Select-Parameters
end-if
do Init_Printer
end-procedure
!********************************************
begin-procedure Get-Values
do Get-As-Of-Date
end-procedure
begin-program
do Init-DateTime
do Init-Number
do Get-Current-DateTime
do Init-Report
do Main
do Reset
do Stdapi-Term
end-program
!***********************************************************************
begin-procedure Main
!***********************************************************************
display 'in procedure main '
Begin-Select
J.emplid
DISPLAY &j.emplid
J.empl_Rcd#
J.deptid
let $todept = &j.deptid
J.Effdt
let $acteffdt = &j.effdt
J.Effseq
display &j.Effseq
J.Action
let $action = &j.action
do Select-Prior-Row
>From PS_JOB J
Where J.Deptid like '0103%'
and J.Empl_status = 'A'
and (J.Action not in ('REH'))
and J.Effdt = (select Max(J1.Effdt)
from PS_JOB J1
Where J1.Emplid = J.Emplid
and J1.Effdt between $Fromdate and $Thrudate)
and J.Effseq = (Select Max(J2.effseq)
from PS_JOB J2
where J2.Emplid = J.Emplid
and J2.Empl_Rcd# = J.Empl_Rcd#
and J2.Effdt = J.Effdt)
and Exists
(select 'X' from PS_JOB JX
where JX.emplid = J.emplid
and JX.deptid <> J.deptid
and JX.effdt = (select max(JZ.effdt) from PS_JOB JZ
where JZ.emplid = JX.emplid
and JZ.effdt < J.effdt)
and JX.Effseq = (Select Max(JX1.effseq)
from PS_JOB JX1
where JX1.Emplid = JX.Emplid
and JX1.Empl_Rcd# = JX.Empl_Rcd#
and JX1.Effdt = JX.Effdt))
End-Select
End-Procedure
!***********************************************************************
begin-procedure Select-Prior-Row
!***********************************************************************
display 'in procedure select prior row '
Begin-Select loops=1
JP.DEPTID () on-break print=never
level = 1
before=dept-change
skiplines = 1
JP.Jobcode (+1,1)
Pos.Descr (,12)
P.name (,35,33)
JP.emplid (,62,10)
DISPLAY &JP.EMPLID
JP.empl_Rcd#
JP.Effdt
JP.Effseq
JP.Empl_status (,74)
JP.Action
Pos.Std_hrs_default
let #FTE = &Pos.std_hrs_default / 40
do Format-Number(#FTE, $out, 'b9.99')
print $out (0,78)
JP.Std_hours
display 'std hrs'
display &jp.std_hours
let #FTE = &JP.std_hours / 40
do Format-Number(#FTE, $out, 'b9.99')
print $out (0,84)
print $todept (0,91)
print $acteffdt (0,103)
print $action (0,116)
P.Supervisor_id
move &p.Supervisor_id to $emplid
do Get-Employee-Name
Print $name (,123)
>From PS_JOB JP,
PS_Personnel_Hist P,
PS_Position_Data POS
Where JP.Emplid = &J.emplid
and JP.Empl_Rcd# = &J.Empl_Rcd#
and JP.Effdt = (select Max(J1P.Effdt)
from PS_JOB J1P
Where J1P.Emplid = JP.Emplid
and J1P.Empl_Rcd# = &J.Empl_Rcd#
and J1P.Effdt < &J.effdt)
and JP.Effseq = (Select Max(JP2.effseq)
from PS_JOB JP2
where JP2.Emplid = JP.Emplid
and JP2.Empl_Rcd# = JP.Empl_Rcd#
and JP2.Effdt = JP.Effdt)
and JP.Emplid = P.Emplid
and P.Effdt = (select Max(P1.Effdt)
from PS_Personnel_Hist P1
Where P1.Emplid = P.Emplid
and P1.Effdt <= JP.effdt)
and JP.Position_nbr = Pos.Position_nbr
and Pos.Effdt = (select Max(P3.Effdt)
from PS_Position_data P3
where P3.Position_nbr = Pos.Position_nbr
and P3.effdt <= JP.effdt)
order by JP.deptid
End-Select CHAR
End-Procedure
begin-Procedure Dept-Change
display 'in procedure dept change'
new-page
move &JP.DeptId to $DeptId
do Get-Department-Name
print 'DEPARTMENT:' (+1,1)
print $DeptId (0,13)
print $DeptName (0,30)
End-Procedure
#Include 'getcodta.sqc' !Get-Company-Data procedure
#Include 'getdptnm.sqc' !Get Department Name from the Department Table
#Include 'getempnm.sqc' !Get Employee Name
#Include 'reset.sqc' !Reset printer procedure
#include 'hrrnctl1.sqc' !Get run control parameter values
#include 'hrgetval.sqc' !Get values mask routines
#include 'askaod.sqc' !Ask As Of Date input
#Include 'readxlat.sqc' !Read-Translate-Table procedure
#Include 'curdttim.sqc' !Get-Current-DateTime procedure
#Include 'datetime.sqc' !Routines for date and time formatting
#Include 'number.sqc' !Routines to format numbers
#Include 'stdapi.sqc' !Routines to Update Run Status
#Include 'sqrtrans.sqc'
#Include 'useprntr.sqc'