Skip to content

DFNew_Page - cWinReport2

Outputs a new page

Type: Procedure

Parameters

Parameter Type Description
Cols Integer Not used in Winprint2 (The number of columns for the page (optional))

Syntax

Procedure DFNew_Page Integer Cols

Call Example

Send DFNew_Page Cols

Description

The DFNew_page procedure creates a new page. When a new page is printed, page headers or footers will be printed automatically. If you have set DFSubHeaders or DFSubTotals to wrap (reprint), they will also be printed on the new page. Normally SubHeaders are set to wrap and SubTotals are set to no wrap.

Procedure SubTotal1 // customer total
    number nAmount
    integer iClr
    Boolean bBreak

    get SubTotal 2 to nAmount
    send Add_SubTotal 3 nAmount // subtotal 3 is total of all

    //Get DFGetDFColor of winprintId  242 242 242 to iClr // doesn't work YET
    Move -218959360 to iClr

    DFFont "Arial" //  Use Arial
    DFFontSize 8
    DFBeginHeader DFSubTotal 1
        DFHEADERPOS HDR_LEFT
        DFHeaderFrame HDR_Margins 0.01 RGB_DGREY iClr
        DFHeaderMargin HM_BottomOuter 0.16

        DFWritePos   "Customer Total:"  12.00 (FONT_BOLD+RGB_DBLUE+FONT_RIGHT)
        DFWritelnPos nAmount 14.1              (FONT_RIGHT+FONT_Bold) 2 0
    DFEndHeader
    Get pbOnePagePerCust to bBreak
    if bBreak begin
        send DFNew_Page
    end
End_Procedure
Col 1 Col 2
Note: The columns is provided for backwards compatibility with WinPrint1. It is not used in Winprint2 and should be omitted.