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

No data in CR9 reports

Status
Not open for further replies.

bfikes

Programmer
Nov 8, 2002
5
US
We have some reports that we display from a VB application. They worked with CR8.5, but after converting them to CR9 and changing the application's components, no data is displayed. There are no error messages, but the reports are completely blank.

We have an object that implements CRDataSourceLib.CRDataSource, and we pass data to the report's tables via Table.SetDataSource passing the implemented object. I think this is where the problem lies, but I don't know how to fix it. The reports originally used the native SQL Server driver, but when saving them in CR9, they automatically changed to the ODBC driver.

We have some other reports that get their data directly from the database (instead of a CRDataSource object), and those work.

Any ideas would be appreciated.

Brian
 
Hi Brian,

Since you are using the TAble.SetDatasource method. The best way to send your data is to pass ado recordset as the datasource to the Table.SetDatasource method. In this case you will have to convert the report to use the ADO driver. In this way you are not asking crystal to do any data access. You are executing the query and getting the recordset and sending the actual data to Crystal. This is more reliable.

If you are using ODBC you can pass a stored procedure to the table. First Connect to the database using SetLogOnInfo and then call TAble.Location(YourstoredProcedure)
Hope this helps, let me know the outcome.

Cheers,
Techi
 
Is there any way to use the CRDataSource object instead of an ADO recordset? Our existing code (which works for version 8.5) is all based around this object. Is this no longer supported for version 9, or has it changed? It would be a lot of work to convert all of the data for all of our reports to ADO recordsets.
 
I haven't used this CRDataSource object in CR8.5. Which dll is it from. I have CR9 installed on my machine currently. If you tell me which dll the object is part of I can find out for you.

Cheers
 
It is actually an interface called "CRDataSource 1.0 Type Library", file name "crsource.tlb". In Developers Help the main topic is "Crystal Data Source Type Library" under "Active Data". You need to create a class that implements the properties and methods of this interface. Then you are supposed to be able to pass an object of this class to the Active Data Driver using the SetDataSource method.

After more experimentation, I discovered that if the .rpt file only uses a .ttx file (data definition file) as its data source, then our code still works for version 9. But if the report uses a database connection for one table and a .ttx file for other tables, then it only works with version 8.5. With version 9, I get an error when I call the report's table object's SetLogOnInfo method or try to set its Location property. We need to be able to change the table's Location when we distribute the application to clients (or when we switch databases within the application).

None of that would be necessary if we didn't need to use a database table. But when we tried basing reports and subreports on TTX files alone, the subreport links would not work. So we had to put a database table in each subreport and the main report in order to link them together.

So that is where I'm stuck right now. SetLogOnInfo causes the error "Logon failed. Datasource name not found and no default driver specified".
 
I have CR9 installed on my primary machine. I searched my complete harddrive for crsource.tlb, but could not find it.
However I have a secondary pc on which I have CR8.5 installed, I found the crsource.tlb on the 2nd one. So I think, crsource.tlb is not part of CR9, but have not verified it with Seagate.

I bet thats the problem, they are no more supporting it. However the CR9 help contains the topic on "Crystal Data Source". You will have to verify it with Seagate. Sorry I could not help you more.

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top