Views

book list add book to my bookshelf create a bookmark purchase this book online

mastering crystal reports 9
Chapter 11 - Using SQL in Crystal Reports
Mastering Crystal Reports 9
by Cate McCoy and Gord Maric
Sybex 2003

Views are another type of database object that can used as a data source when you’re using a SQL-accessible database. Like stored procedures, views are treated as table objects in Crystal Reports. You can think of a view as presenting a particular perspective of the underlying data. For instance, in a table called People, a view built based on that table might be called Women. Its contents would be only those records where the gender field was equal to Female. This new Women view could then be reported on directly.

In a relational database, a view is the dynamic creation of a new relation, or virtual table, as a result of mathematical combinations involving other tables. Since a view is virtual, its definition exists in the database but does not exist as an actual stored table structure. The view is built at runtime by retrieving the view definition from a table, executing, and storing the temporary results in memory. The view definition has a name, and this is what is accessed to produce a table object in memory. Since views are dynamic entities, any change to an underlying table is automatically reflected in the view. In the example of the Women view, if a new person was added to the People table, and that person happened to be female, the Women view would reflect the addition of the new person.

As data sources, if views exist in the database, they display in the Database Expert together with tables and stored procedures. If they exist but are not visible, you can enable them to be visible by choosing File > Options, selecting the Database tab, and enabling the Views check box.

Use of content on this site is expressly subject to the restrictions set forth in the Membership Agreement
 
Conello © 2000-2003     Feedback


Mastering Crystal Reports 9
Mastering Crystal Reports 9
ISBN: 0782141730
EAN: 2147483647
Year: 2005
Pages: 217

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