View Full Version : How does Crystal do its record selection


wan2fly99
11-15-2011, 06:58 AM
I have to tables

vendor

ap

I have linked them up in database link on a key field vendor-num and said the vendor table is an outer join

In the report in the Select Expert: I have another requirement to state that AP record the field balance <> 0

Now Does crystal first do the outer join and get all the records.

Then it goes to the Select Expert and filters out more?

I wanted all the vendor records and and only those AP records with balance not 0. If no AP records for that vendor I still wanted the vendor record

It seems if AP record with balance of 0, the associated vendor record does not get selected.


A bit confused here

Any help is appreciated

boblarson
11-15-2011, 01:02 PM
Crystal Reports connects to the Access database and then the Select Expert will modify the Recordsource SQL Statement that Crystal is using for the Database "connection." If you want an outer join, you can't just set it in the relationships of the database. You would need to modify Crystal's SQL Statement or you would need to create the query in Access and then link to that from Crystal.

It has been over 5 years since I've been inside Crystal Reports so I can't tell you exactly where all of this is set. But hopefully I've given you enough of a clue to be able to find it yourself.

wan2fly99
11-16-2011, 04:54 AM
thanks for the help was afraid of that. Will look into biulding an sql stmt have that as the record source for the crystal report then

kevlray
11-16-2011, 12:13 PM
wan2fly99:

When working with Access, having Crystal Reports use an Access query should work the best. You could use the Database Expert and link tables there, but I have seen a big performance hit doing that way. I hope this helps.