Developer's reference PB2XLS for PowerBuilder

Reference > N_XLS_WORKSHEET > of_add_h_pagebreak

of_add_h_pagebreak() method

Add horizontal page break to a worksheet. A page break causes all the data that follows it to be printed on the next page.

Syntax

worksheet.of_add_h_pagebreak ( pagebreak )

Parameters

PagebreakThe unsigned integer whose value is the row of page break

Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs.

Description

Horizontal page breaks act between rows. To create a page break between rows 24 and 25 you must specify the break at row 25. However in zero index notation this is actually row 24.
Note: If you specify the "fit to page" option via the of_fit_to_pages() method it will override all manual page breaks.

Examples

worksheet.of_add_h_pagebreak ( 10 )    	 //Ten rows on the first page