The help file that comes with the component has examples.
I'm using the CrpeDS Component which allows you to set it's dataset property to a Delphi dataset and then I connect the report like this...
With Crpe do begin
Subreports[7].Tables[0].DataPointer := CrpeDSMaster.DataPointer;
Subreports[6].Tables[0].DataPointer := CrpeDSGenForm.DataPointer;
Subreports[5].Tables[0].DataPointer := CrpeDSGEDCom.DataPointer;
Subreports[4].Tables[0].DataPointer := CrpeDSFormAssumptions.DataPointer;
Subreports[3].Tables[0].DataPointer := CrpeDSFactOptions.DataPointer;
Subreports[2].Tables[0].DataPointer := CrpeDSGenFormDetail.DataPointer;
Subreports[1].Tables[0].DataPointer := CrpeDSGenForm.DataPointer;
Subreports[0].Tables[0].DataPointer := CrpeDSName.DataPointer;
end;
FYI, Subreports[0] is the main report, and connecting in reverse order leaves you with the main report as the active item. Also whenever the report is executed it reads the dataset so the current record changes.
There are other ways to set this up.
And in general there is no sharing of data connections between Delphi and Crystal Reports. If you don't use the CrpeDS component, you'll get two connections to your database, one from the app itself and one from Crystal. That said, if the rpt runs OK from inside the Crystal Designer application using it's internal data connection setup, that's all you need. If the ODBC DSN the report uses is available on the application machine and it's named the same as on the developer machine, you shouldn't need to do anything in Delphi. File DSNs are good in this scenario because you can distribute them with your application. Only if you need to customize the data source at runtime, do you need to do any setup inside the application. Refer to the help file for the component for more information.