Chapter 4. OpenRPT and ODBC

Table of Contents

1. The Access Database
2. Sample ODBC Connection
3. Creating the Report’s SQL with the MetaSQL Editor
3.1. Connecting Through the ODBC Driver
3.2. MetaSQL Parameters
3.3. The Query
4. Report Definition
4.1. Report Properties
4.2. Creating the Query Source
4.3. Establishing Report Sections
4.4. Defining Parameters
4.5. Saving the Report’s XML Definition File
5. Generating Reports with RPTRender
5.1. Connecting Through ODBC to the Database
5.2. Opening the XML Report Definition
5.3. Setting Parameters at Run Time
5.4. RPTRender Run Time Switches

OpenRPT and its suite of tools enable you to connect natively to the PostgreSQL database. However, OpenRPT can also be used to connect to other databases using an ODBC (Open DataBase Connectivity) connection. In this chapter we will examine how to connect to an alternate database—for our example, an Access database—using ODBC. We will be showing you how to build a new report from the ground up, as we address the following steps: