A method and system for previewing and printing customized pages, such as
business forms including invoices and billing statements. An
author-created template has HTML and OLE components (controls) placed on
a page to define a visual representation of a class of object that is
part of a database. The controls merge data from a selected current
object of the database into the template, producing a visual
representation of the object that is both viewable and printable. An
extension to the present invention involves the use of multiple-page HTML
to dynamically provide subsequent pages based on retrieved data. For
example, if the data retrieved by the controls for an invoice is too
large to display on a single invoice page, another HTML page, that is
different from the first page of the invoice, would be automatically
loaded as a template and the overflow data properly merged therewith.