Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

record viewing logic

Status
Not open for further replies.

CTP

IS-IT--Management
Nov 30, 2000
1
AU
I am a relative novice and am after confirmation on Crystal's working logic. For instance, when using a database with tables including country, state, suburb and street grouped in this order, in what order does Crystal view the records? I assume it sorts the records first by country first, then state,etc. Then begins viewing the individual records by looking at all the records linked to the first street in the street table in the details section then the next street and all the associated details, and so on. When it is done with all the streets associated to the first suburb does it then go to the next record in the suburb table i.e. a new suburb, and begin the process of then looking at all the streets and associated details, before going to the next suburb? Then when finished with all the records in the suburbs table associated with that state, it picks a new state. Does crystal work this way or does it just view each record within the selection criteria once, looking at what is contained in each group header/Footer only when the details of the associated field to that group changes?
 
The answer to that depends a bit on which database you are using becuase most of the work is done by the database itself.

In general Crystal sends the criteria to the database application and then lets the database assemble what is called a "results table" which includes all of the records that meet your criteria. Different databases do this in different ways but usually sorting is a last step.

First the database links together all of the tables used, finding which records match with partners in other tables. It then evaluates each composite record (made up of matching individual records) to see which records qualify for the report. It is these composite records that are returned to Crystal and that then become the results table. You will see the number of composite records listed at the bottom of the preview screen.

Crystal then does any grouping, sorting and totaling needed in the report. It then formats the report and sends it to the printer. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top