The printusingform statement allows the current database to be printed using a different form than the one currently being displayed.
This statement has two parameters:
database – is the name of the database file that contains the form to be printed. The database file must be open. If this parameter is empty (
"") or omitted, the current database is assumed.
form – is the name of the form to be printed.
The print and printonerecord statements normally print using whatever form is currently active. If you want to print using a different form, you must first open that window and then print. The printusingform statement is another way to print an alternate form. Using this statement, you can print using any form in any open database (the form does not have to be in an open window). Note: The printusingform statement may only be used when a form window is currently on top.
The procedure below will print My Report, even if another form is currently visible.
printusingform "My Report" print dialog
The procedure below will print Standard Report #4 from the Reports database. Although the form is from the Reports database, the data will be from the current database. This usually only makes sense if the two databases have the same fields.
printusingform "Reports","Standard Report #4" print dialog
|10.0||Updated||Carried over from Panorama 6.0, but the DATABASE parameter is now optional.|