ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • iPageNum and reports created with the report editor
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns or initializes the number of the page currently printed.
Remark: iPageNum can be used to force the number of the first page to a number other than 1.
Example
// Prints the page number
iPrint(iXPos(200) + iPageNum())
// Forces the page number to 10
iPageNum(10)
...
iEndPrinting()
Syntax
<Result> = iPageNum([<Page number>])
<Result>: Integer
Number of current page.
<Page number>: Optional integer
New number for the current page.
AndroidAndroid Widget Java This parameter is not available.
Remarks

iPageNum and reports created with the report editor

  • iPageNum can be used in reports, provided that the print is started (in the "After printing" event of a break, for example). This function must not be used in the report opening code. You must use PageNumber.
  • iPageNum should not be used in the pre-print code of a block. Indeed, the final size of block is not known in this process and the page number on which the block will be positioned may change.
  • The result of Reset the number of pages after printing the block is not affected by the reinitialization of page numbers in the reports ("iPageNum" in the "UI" tab of a block description window).
Component: wd290prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Exemplo iPageNum
IF CBOX_gerar_pdf=True THEN
iDestination(iPDF)
ELSE
iPreview(ipvZoom100)
END

iBorder(0,0,iPageWidth(),10,1,10)

//Lado Esquerdo
//Linha
//Altura
//Espessura
//Cor Fundo

iPrint(ixPos(1) + "Empresa Matos informatica Ltda "+ixPos(180) +"Pagina"+iPageNum())

iHLine(0, iPageWidth())
iPrint("")
iPrint(iXPos(1) + "Codigo" + iXPos(18) +"Nome")
FOR EACH bancos
iPrint(iXPos(1)+ NumToString(bancos.id_bancos,"06d") + iXPos(18) + bancos.nome)
END
iEndPrinting()
ShellExecute(iLastFile())

// Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/11/aula-975-windev-relatorio-35-ipagenum.html

https://www.youtube.com/watch?v=yiWEo7boDcU

De matos
04 Dec. 2016

Last update: 06/21/2023

Send a report | Local help