cancel
Showing results for 
Search instead for 
Did you mean: 

BDS2006 + Crystal XI: How to dynamically assign a datasource

Former Member
0 Kudos

Hi

Please help me.

I am trying to convert an application developed in Delphi 6 which was using Crystal 8.5. The reports are using dynamically prepared query result sets as the datasource of report tables. The work is done like the following:

TableItems[1].DataPointer := addr(ReportDataItem.FAuditTrailSource.Intf)

Here the FAuditTrailSource is a TCrystlIndexDatasetDS which implements ICRDataSource interface and Intf is of type ICRDataSource.

I have bought and installed Crystal XI and installed the VCL XI for BDS2006. If I run the app now with the crpe32.dll of version 8.5, I will be able to view the reports in my app, which are prepared in Crystal 8.5 with dynamically generated data. But if I use crpe32.dll of version 11, this dynamic datasource allocation fails, if I want to view a report . But if I do not use this dynamic change of datasource, the reports comes up with all the data from a design-time bound table. The exact error message I get is "Failed to load database information. Tables[0].SetDataPointer <PESetNthTablePrivateInfo".

Any idea what could be going wrong?

The unig containing the declaration of ICRDataSource is a generated one and I guess there may be some change in the implementation of it. But I do not have any idea from which control I can regenerate the source for this. Any hint regarding will be greatly appreciated.

Please help.

Thanks & regards,

Sacher

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

The active data object you're looking for is probably TCrpeDS.

If that doesn't work for you and you're looking at options for connecting directly, I'd recommend setting the ConnectBuffer string on each table. We've encountered some issues with PESetNthTableLocation behind the scenes throwing errors when setting the connection properties individually.

former_member183750
Active Contributor
0 Kudos

The database engine was completely rewritten in CR 9 and PESetNthTablePrivateInfo was deprecated. It is still there for "backward compatibility", but I would highly recommend moving away from it and use the connection properties bag instead. I do not have any VCL code as VCL is not technically supported. However, the following RDC White Paper re. connection properties should be of help:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00635998-751e-2b10-9cba-f50ee1e4...

Ludek