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

Re: Need SQR Program Help!



Cally,

        I forgot you wanted a page break.  If you reviewed the previous
reply I sent you, after you print the building count, add the following
line:

        new-page

Raymond


-----Original Message-----
From: Iberg, Cally A (ISI) [mailto:IbergCA@NAVAIR.NAVY.MIL]
Sent: Thursday, July 20, 2000 3:46 PM
To: SQR-USERS@list.iex.net
Subject: Need SQR Program Help!


Hello!
I have an SQR program that I need help with!  I'm relatively new to SQR and
have been fighting with this all day.  What I'm looking to do is print a
report that page-breaks each time the bldg no. changes, counting the number
of bldgs. on each page.  I know that I have to do some sort of on-break, but
nothing I've tried has worked.  A copy of the code is below.  If someone
could show me where I need to insert the on-break so that it gives me each
bldg. on a new page, with a count I'd greatly appreciate it!

The headings will not match the select statement since I moved the bldgno
up.

Thanks, Cally

----------------------------------------------------------------------------
--------------------------------

begin-setup
 page-size 15000 250
end-setup

begin-report
 do get_records
end-report

begin-heading 2
 print 'PAXIS ID TAG'           (,1,)
 print 'NOMENCLATURE'   (,15,)
 print 'CPU TYPE'               (,37,)
 print 'MODEL NUMBER'   (,52,)
 print 'MFR NAME'               (,68,)
 print 'SERIAL NUMBER'          (,89,)
 print 'COST'                           (,115,)
 print 'BLDG'                           (,124,)
 print 'LOCATION'               (,130,)
 print 'CUSTODIAN'              (,151,)
 print 'COMP'                           (,182,)
 print 'LAST INV DATE'          (,190,)
 print '-'                              (+1,1,202) fill
end-heading

begin-procedure get_records
 move 0 to #cnt

begin-select
bldgno                          (+1,1,5)
uic                             (,+1,6)
govtidpre                       (,,1)
govtidtag                       (,,6)
nomen                           (,+1,20)
cpu_type                        (,+1,15)
modelno                 (,+1,15)
mfrname                 (,+1,20)
serialno                        (,+1,20)
cost                            (,+1,14)   edit 99,999,999.00
!bldgno                 (,+1,5)
location                        (,+1,20)
custodian                       (,+1,30)
competency                      (,+1,7)
lastinvdt                       (,+1,11) edit dd-mon-yyyy

 let #cnt = #cnt +1

 from inventory.i2pia02v
  where bldgno like '665%'
  and lastinvdt < '10-JUL-2000'
  order by bldgno, uic, govtidpre, govtidtag
end-select
 print 'TOTAL:' (+2,1,)
 print #cnt     (,9,) edit 99999
end-procedure