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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you create and use an ADO recordset as source for Crystal Report 3

Status
Not open for further replies.

SBendBuckeye

Programmer
May 22, 2002
2,166
US
Hello All,

We are using Crystal Reports 8.5. Does it support an ADO recordset as a data source? If so, can someone post a little bit of code to get me started or point me to some helpful links? Thanks for any ideas and/or suggestions!

Have a great day!

j2consulting@yahoo.com
 
There are a few different ways to do it:

You can create a Data Definition file (ttx) for your data source, design your report, then pass a recordset to the report at runtime. Good document describing the steps for this here:

Another option would be to directly type in your SQL to define the report's data structure. When selecting your Data Source, choose 'More Data Sources' > 'Active Data' > 'Active Data (ADO)' > and 'Make New Connection'. Once you set up your data source, it will have a single table (ado). Add it as the report's data source, then type in your SQL.

The steps for calling the report from VB will vary depending on whether you'll be using the OCX or RDC. Pages 9 and 10 of the above .pdf describe the steps for the RDC. Sample app for the OCX here:

-dave
 
If you are integrating a report into your app, there is a way to pass the ADO recordset to your report at run time. You will need to design it with a TTX file.

If your recordset is stand alone, look into making it a COM data driver.
1. Create a DLL project with a class cccc
2. Insert your function into fff the class
3. Compile it -and copy and register it on another machine
if it is needed there
4. Inside CR8.5, select Other Data Sources/Active Data/COM Connectivity. If COM Connectivity isn't there you will need to install the CR COM driver p2smon.dll.

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top