Developer's reference PB2XLS for PowerBuilder

Reference > N_XLS_WORKSHEET > of_add_v_pagebreak

of_add_v_pagebreak() method

Add vertical 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_v_pagebreak ( pagebreak )

Parameters

PagebreakThe unsigned integer whose value is the column of page break

Return value

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

Description

Vertical page breaks act between columns. To create a page break between columns 7 and 8 you must specify the break at column 8. However in zero index notation this is actually column 7.
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_v_pagebreak ( 10 )    	 //Ten columns on the first page