Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
So now we have a report with a header, footer, and a list of last names. Well, I don't think that is going to get us very far with our boss. Let's add a few more columns to the report to make it more meaningful. Expand the Database Fields node in the Field Explorer. Expand the Contact table and drag the FirstName and EmailAddress fields into the Details section of the report. Click on the "Main Report Preview" button and notice that there are approximately 313 pages in the report, depending on how large you made the sections. Click back to the Main Report view. Expand the Employee table in the Field Explorer and drag the NationalIDNumber field to the Details section of the report. Now click on the "Main Report Preview" button again. Now there are only five pages. This is because employees are not the only people stored in the Contact table; customers are too. Since a field wasn't used on the report from the Employee table, Crystal ignored the join and brought all the records from the Contact table. If you open SQL Query Profiler and view the executed SQL statement when the NationalIDNumber is not in the report, it looks like this:
SELECT "Contact"."LastName", "Contact"."FirstName", "Contact"."EmailAddress" FROM " AdventureWorks"."Person"."Contact" "Contact" ORDER BY "Contact"."LastName"