devxlogo

Printing One Page of a Report

Printing One Page of a Report

Question:
How can I give the user the option to print only one page in a Visual FoxPro report?

Answer:
The REPORT FORM command has a RANGE parameter. Here is information from the help file:

    RANGE nStartPage [, nEndPage]
    Specifies a range of pages to print. nStartPage specifies the first page printed; nEndPage specifies the last page printed. If nEndPage is omitted, the last page printed defaults to 9,999.

For example, to print pages 3-5 of a report called myreport.frx, you could execute the following:

REPORT FORM MYREPORT RANGE 3,5 TO PRINT

To print one page (for example, page 3) you could execute the following:

REPORT FORM MYREPORT RANGE 3,3 TO PRINT

See also  How to Block Websites During Certain Hours on a Mac Computer
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist