Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > S > SET

PAGEMODE

Scroll Prev Top Next More

Operating Condition

 

Syntax: SET PAGEMODE ON/OFF

 

Default: OFF

 

Mode: Single- or Multi-user

 

Use PAGEMODE to design reports through a custom R:BASE program. With PAGEMODE on, you create a page of a report in memory, then send the report to a printer or file. PAGEMODE is an alternative method to creating reports through the Report Designer; the two methods work in different ways.

 

The WRITE, SHOW VARIABLE, and SELECT commands are used to "display" data on a virtual page. To determine the row location of the cursor on the virtual page, use the ISTAT function with the keyword PAGEROW after a SHOW VARIABLE command. (ISTAT('pagerow') does not work with the WRITE command.) The DECLARE CURSOR command is usually used for retrieving data for printing. You control form feeds (new pages) in your program by using the NEWPAGE or OUTPUT SCREEN command.

 

At the beginning of your program, set both SET LINES and SET WIDTH to accommodate the report's size. Then set PAGEMODE to ON. You cannot write to a line longer than the current LINES setting or wider than the current WIDTH setting. You also cannot change the LINES and WIDTH setting without setting PAGEMODE to off first.

 

To send printer control codes to a printer, use the CHAR function to define a variable containing the printer control codes. Then, that variable is sent to the printer using the SHOW VARIABLE or WRITE command. For example,

 

 SET VARIABLE vLandscape = (CHAR(27) + CHAR+

                           (38) + CHAR(108) + CHAR+

                           (49) + CHAR(79))

 WRITE .vLandscape

 

The printer control codes can be found in the user's manual for your printer. PAGEMODE allows you to:

 

Produce multi-column reports.

Design different styles for the pages of the report, such as a report with a personalized letter as the first page.

Create reports from tables with many-to-many relationships that have two or more detail sections.

Format odd and even pages differently throughout a report.

Create reports wider than 255 columns and longer than 84 lines.

Print headers and footers only on the last page or first page.

Customize reports so break headers and footers are located on the same page.

Place a different break header on every page or the same break header on every page.

 

The following command line enables PAGEMODE:

 

 SET PAGEMODE ON

 

For more information on using PAGEMODE, please see Using PAGEMODE.