devxlogo

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

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  How Seasoned Architects Evaluate New Tech

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.