What we provide here are a few examples to demonstrate how
Access2PDF is used in practice. Each example generates a similar
result, a report Sales Totals by Amount in PDF format. The only
difference is in the choice of application language: ASP, ColdFusion,
or PHP4 for web based reporting; and Visual Basic for
generating reports outside the context of a web browser.
How it works
For the purpose of discussion we'll use the ASP example since
the mechanics are the same regardless of language. In our example we want to open the report Sales Totals by Amount of the Northwind database (a sample database that ships with Microsoft Access) and filter the results to display records greater than a user defined sales amount.
We start by passing a form variable Sales to an ASP page runtest.asp. The Sales value is used
by the report's WHERE condition "SaleAmount>" & Request("Sales"). The ASP page invokes
the Access2PDF COM object and returns the report in PDF format in a new window as well as
a HTML page with a link to the PDF document.
For an overview of Access2PDF Methods, please refer to our
Developer Guide.
Download the programming code for
each language example
(Access2PDF_website_examples.zip, 5KB).