Getting rid of page breaks

melmckee72

New Member
I'm creating a report output, in which I am going through particular records and creating a temp-table.

I'm then doing a for each loop on the temp-table to accumulate some fields data and create the display. I have several frames defined, and using first-of and last-of statements to determine what to output when. Everything is working correctly, except for one little detail. Each change in frame except the display of the accumulated totals, inserts a page break, so my headings and data are all on separate pages.

The code I have written is this:

PROCEDURE OUTPUT:
DEF FRAM HEAD
f4camp label "Campaign # " format "X(4)" skip
f4proj label "Project # " format "X(10)" skip
f4prdnme label "Product Name " format "X(40)" skip
f4prd label "Product Code " format "X(8)" skip
f4ctyp label "Promotion Type" format "X(10)" skip
WITH SIDE-LABELS DOWN width 230.

def fram panelhead
f4camp label "Campaign # " format "x(8)" skip
f4panel label "Panel # " format ">>>>" skip
f4pdsc label "Panel Description " format "X(40)" skip
f4vendor label "Vendor " format "X(10)" skip
f4wave label "Select from [Wave 1,2,3, etc]" format ">>>>" skip
f4inkjet label "Inkjet Message/Station Code " format "X(100)" skip
f4output label "Method of Shipping " format "X(10)" skip
f4keyline label "Keyline: "format "X(40)" skip
F4campnotes label "Special Notes " skip
with side-labels down WIDTH 230.

def fram panel
f4keycde label "BLR Key" format "X(12)"
f4w1qty column-label "Wave 1!Output Qty" format ">>>>>>>>>>"
f4w2qty column-label "Wave 2!Output Qty" format ">>>>>>>>>>"
f4w3qty column-label "Wave 3!Output Qty" format ">>>>>>>>>>"
f4wtot column-label "Total!Quantity" format ">>>>>>>>>>"
f4w1output column-label "Wave 1!Select Qty" format ">>>>>>>>>>"
f4w2output column-label "Wave 2!Select Qty" format ">>>>>>>>>>"
f4w3output column-label "Wave 3!Select Qty" format ">>>>>>>>>>"
f4wouttot column-label "Total!Selected" format ">>>>>>>>>>"
f4per column-label "Percent!Selected" format ">>>.99"
f4nkeycde column-label "BackEnd!Keys" format "X(12)"
f4rte column-label "Rate!Code" format "X(6)"
f4tslug column-label "Title Slug" format "X(40)".

FOR EACH BPDTL WHERE BPROJ = MPROJ NO-LOCK BREAK BY BPANEL BY
BPAR_LST BY BPAR_EFF:
CREATE FOUT4.
ASSIGN F4CAMP = BCAMP F4PROJ = BPROJ F4PRD = BPRD_CDE F4CTYP = BMCTYP
F4KEYLINE = "Acct#/" + bpRD_cde + "/" + brte + "/[key]"
f4nkeycde = bsource + string(beffort)
f4keycde = bpar_lst + string(bpar_eff)
f4output = boutput f4inkjet = binkjet f4wave = bwave f4vendor = bvendor
f4pdsc = btest f4panel = bpanel f4src = bpar_lst f4effort = bpar_eff
f4w1qty = binw1qty f4w2qty = binw2qty f4w3qty = binw3qty f4per = bpercent
f4nkey = bsource f4neffort = beffort f4rte = brte
f4tslug = bslug f4wtot = f4w1qty + f4w2qty + f4w3qty .
if bwave = 1 then f4w1output = boqty.
else if bwave = 2 then f4w2output = boqty.
else if bwave = 3 then f4w3output = boqty.
f4wouttot = f4w1output + f4w2output + f4w3output.
find first prd where prd.prd-cde = bprd_cde no-lock no-error.
if available prd then assign f4prdnme = prd.dsc.
end.

for each fout4 no-lock break by f4proj by f4camp by f4src by f4effort.
accumulate F4W1QTY (TOTAL BY F4PROJ BY F4CAMP).
accumulate F4W2QTY (TOTAL BY F4PROJ BY F4CAMP).
accumulate F4W3QTY (TOTAL BY F4PROJ BY F4CAMP).
accumulate F4WTOT (TOTAL BY F4PROJ BY F4CAMP).
accumulate F4W1OUTPUT (TOTAL BY F4PROJ BY F4CAMP).
accumulate F4W2OUTPUT (TOTAL BY F4PROJ BY F4CAMP).
accumulate F4W3OUTPUT (TOTAL BY F4PROJ BY F4CAMP).
accumulate F4wouttot (TOTAL BY F4PROJ BY F4CAMP).
if first-of (f4proj) then display F4CAMP F4PROJ F4PRDNME F4PRD F4CTYP
WITH FRAM HEAD down.
IF FIRST-OF (F4CAMP) THEN DISPLAY f4camp F4PANEL F4PDSC F4VENDOR F4WAVE
F4INKJET F4OUTPUT f4keyline F4CAMPNOTES WITH FRAM PANELHEAD down.
DISPLAY F4KEYCDE F4W1QTY F4W2QTY F4W3QTY F4WTOT F4W1OUTPUT F4W2OUTPUT
F4W3OUTPUT F4WOUTTOT F4PER F4NKEYCDE F4RTE F4TSLUG
WITH FRAM PANEL DOWN width 230.
DOWN WITH FRAM PANEL.
IF LAST-OF (F4CAMP) THEN DO:
DISPLAY
"TOTAL"
accumulate total by f4camp f4w1qty
accumulate total by f4camp f4w2qty
accumulate total by f4camp f4w3qty
accumulate total by f4camp f4wtot
accumulate total by f4camp f4w1output
accumulate total by f4camp f4w2output
accumulate total by f4camp f4w3output
accumulate total by f4camp f4wouttot with fram subtot down width 230.
down with fram subtot.
end.
END.
END PROCEDURE.


Thanks for any help in advance.
 
When you say OUTPUT TO PRINTER, the output is paged by default so it's the same as saying OUTPUT TO PRINTER PAGED.

To switch off paging, try using OUTPUT TO PRINTER PAGE-SIZE 0.
 

melmckee72

New Member
OK - that took care of my page break between the 1st and 2nd frame, but I still have a page break between the 2nd and 3rd.

Any ideas?
 
Top