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

Page Break



Hi SQRers:
I might confused you with my previous help message. This is more clear I think.
I writing a program with combination of listing and labels. There is a
parameter option for user to choose either producing listing or labels. The
problem is page breaking. If listing, I want to have a page break at 55 lines.
If labes then do not do page break. If I put 'no-formfeed' command at
BEGIN-SETUP then listing will not do a page break. Without 'no-formfeed'
command, labels will do page break after each label print.
Here is an example:

!-------------------------------------------
BEGIN-SETUP
  page-size {numlines} 133
  no-formfeed
END-SETUP
!-------------------------------------------
BEGIN-PROCEDURE start-up
  input $option 'Enter LIST or LABEL '
  evaluate $option
    when = 'LIST'
      #define numlines 55
      do list_query
      break
    when = 'LABEL'
      #define numlines 6
      do label_query
      break
  end-evaluate
END-PROCEDURE
!-------------------------------------------
BEGIN-PROCEDURE list_query
begin-select
spriden_id      &id
...
from ...
where ...
  print &id (+1,1)
  ...
  if (#current-line = 55)       ! Do page break at 55 lines for listing.
    new-page                    ! Since 'no-formfeed' at BEGIN-SETUP, it won't
  end-if                        ! do form feed here ???
end-select
END-PROCEDURE
!-------------------------------------------
BEGIN-PROCEDURE labe_query
  columns 1 35 69 103
begin-select
spvadds_street_line1    &ad1
...
from ...
where ...
  print &ad1 (+1,1)             ! Do not do page break for labels.
  ...
  next-column
end-select
END-PROCEDURE

Please show me how to control page break as above example. Thank you for your
help.

Ben.


___________________________________________________________________________
Benjamin Le                                           Voice: (503)-977-4970
Portland Community College, Information Technology    Fax  : (503)-977-4987
P.O. Box 19000, Portland, Oregon 97280-0990           Internet: ble@pcc.edu
___________________________________________________________________________