|
Crystal Reports is known as a third-party software tool because it sits as an outside application apart from the stored data and the other applications that created the original data. Its role is to retrieve and synthesize the data. The Database Expert is the mechanism used in Crystal to connect to data.
When you create a new report by choosing File > New, you can either use a Report Creation Wizard or create a blank report to start your report. Right up front, you need to connect to your data source to give Crystal some data to chomp on. The Database Expert is the mechanism by which Crystal connects you to your data. The Database Expert, shown in Figure 10.1, is invoked automatically when you build a new report.
Figure 10.1. The Database Expert
In addition, you can open the Database Expert manually on demand after you’ve begun building your report. This is useful if you want to change to a different data source or add additional data sources to the report. You can open the Database Expert from the Experts toolbar or choose Database > Database Expert.
The five categories of data sources in the Database Expert are described in Table 10.1.
Tip | You can right-click any of the options in the Database Expert to display a context menu. The menu lets you accomplish the following tasks: Add To Report, Add To Favorites, Remove From Report, Properties, Rename Favorite, Delete Favorite, Remove From Repository, Rename Repository Object, and Refresh. |
If you open and close more than five databases within a single Crystal Reports session (meaning without exiting Crystal Reports), the list of databases in the History category will include them all. When you reopen Crystal Reports, the most recently opened five will appear in your History list.
Data Source Folder | Description |
---|---|
Current Connections | Contains a list of all data sources to which Crystal Reports has a current connection. |
Repository | Provides a list of data source connections stored in the common repository. |
Favorites | Holds a manually maintained list of commonly used data sources; you can drag and drop sources from within the Database Expert to add them to the Favorites folder. |
History | Shows the five data sources most recently used within Crystal Reports. |
Create New Connection | Holds the master list of all available data sources, as well as generic mechanisms to connect to new data sources. |
The Database Expert dialog accounts for wide variety of data sources through one simple interface. To achieve this simplicity, Crystal Reports takes a three-tiered information approach to all data sources, which streamlines the model of retrieval and reporting. The three tiers in Crystal’s data architecture are the Crystal Reports software application itself, the database translation layer, and the database storage container layer. These are depicted in Figure 10.2.
Figure 10.2. Data access architecture
As you’ve seen in prior chapters, as a report-writing tool and the starting layer, Crystal Reports provides a front end for retrieving data as well as all the essentials needed to present, group, and summarize it. Once a data source is attached to Crystal, requests for data when the report opens are passed to the database translation layer.
At the database translation layer, Crystal Reports makes use of a series of dynamic link libraries (DLLs) that ship and install with the product to provide access to virtually any database. By using a different DLL for each database that it supports, Crystal solves the problem of accessing and retrieving data from any database. A DLL is a program used by other programs to perform a specific task. In this case, the task is to access a database for reading, updating, inserting, and deleting data.
At the data storage level, Crystal treats data as relational entities obeying the laws of the relational world. The core concept is that data is treated as rows and columns in tables, and that combining multiple tables creates relationships between the elements. Therefore, understanding relational terms such as tables, rows, and columns is helpful to the Crystal designer even if the data being retrieved comes from a text file data source.
Are you ready to put the alphabet soup on the stove and figure out what it all means? There are quite a few acronyms involved with data access, and since they appear on many of the dialog windows in Crystal Reports, we have some natural interest in them. The implementation of Crystal’s database translation layer utilizes any of several connection strategies based on how you choose to access the data. They include:
Open Database Connectivity (ODBC) connections
Object Linking and Embedding Database (OLE DB) connections
Native database connections
Crystal queries
Database files
Dictionary/Infoview
Programmatic access
Each strategy plays a different role, and your goal is to understand and know enough about each one in order to be able to choose the one that makes the most sense for your situation.
Use of content on this site is expressly subject to the restrictions set forth in the Membership Agreement | |
Conello © 2000-2003 Feedback |