Create the report:
1. Create an SQL command against your database and test it outside of Crystal to make sure you are getting what you want for results.
2. Create a new Crystal Report.
3. For your data source, choose "Other Data Sources", then choose ADO.
4. Crystal will ask you to connect to the database.
5. Paste your SQL into the window provided.
Create the VB code:
1. Create an ADO recordset in VB and open it (use the same SQL with regard to fields and tables)
2. Use the following command to use the recordset created in #1 for the report (assuming your report is Report1, and your ADO recordset is adoRS):
Report1.Database.SetDataSource adoRS,3