Understanding Data and Data Sources


The first step in creating a report is always to identify a data source. Today, Crystal Reports supports more than one hundred different types of data sources. These data sources range from traditional databases such as Microsoft SQL Server, Oracle, IBM DB2, and Microsoft Access to other more abstract forms of structured data such as log files, email, XML, COM/.NET/EJB objects, and multidimensional (OLAP) data. Many of the advanced data sources and their specific nuances are covered in great detail in Chapters 1518.

To determine which database driver to use to connect to a certain data source, it's best to understand the different types of database drivers. The following sections discuss direct and indirect access database drivers.

Understanding Direct Access Drivers

Direct access database drivers are built solely for reporting from a specific type of database such as Oracle. If a direct access driver (sometimes called a native driver) exists for the database that you intend to report from, it is generally the best choice. Although they follow the standard model of a database driver, direct access drivers are tailored for that specific database. For example, if you choose the Microsoft Access direct access driver during the creation of a report, you will be prompted for the filename of the Access MDB file. If you are using the Oracle direct access driver, you will be prompted for a server name. Not only is the user experience more specific to that database, a direct access driver often results in better performance than other methods of connecting to the same data. Table 1.1 lists some of the most common direct access database drivers.

Table 1.1. Common Direct Access Database Drivers

Direct Access Driver

Description

Microsoft Access

Used to access Microsoft Access databases and Microsoft Excel spreadsheets

Oracle

Used to access Oracle database servers

DB2

Used to access IBM DB2 database servers


Understanding Indirect Access Drivers

As you might guess from the name, an indirect access driver is one that connects indirectly to an actual data source. Indirect access drivers are not built for any one type of database, but rather are built to read data from a variety of data sources via a standard data access mechanism. The purpose of these drivers is to enable Crystal Reports to use data sources for which direct access drivers do not exist. The two major indirect access drivers provided are ODBC and OLE DB.

ODBC, which stands for Open Database Connectivity, is a long-standing technology built to connect various applications to various data sources via a common mechanism called an ODBC driver. Just as Crystal Reports has a concept of database drivers that enables data access to report developers, ODBC has a concept of ODBC drivers that enables data access to any application. The Crystal Reports ODBC database driver communicates with an ODBC driver, which in turn communicates with the actual database. ODBC drivers are generally developed by the database vendors themselves and often come bundled with the database software.

OLE DB, pronounced "OH-lay-dee-bee," is the evolution of ODBC. Like ODBC, OLE DB has a concept of database drivers, but calls them OLE DB providers. Crystal Reports can read most OLE DB providers. Figure 1.5 illustrates the various ways to connect to your data.

Figure 1.5. The Crystal Reports data access architecture provides unparalleled data access.


Note

If appropriate, any necessary database client software should be installed and configured prior to installing Crystal Reports. However, if you've installed Crystal Reports before installing the database vendor's client software, follow the directions located in the Crystal Reports Help files to ensure correct configuration of the Crystal Reports system Data Source Names (DSNs).





Crystal Reports XI(c) Official Guide
Crystal Reports XI Official Guide
ISBN: 0672329174
EAN: 2147483647
Year: N/A
Pages: 365

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net