Skip to Content
author's profile photo Former Member
Former Member

BDS2006 + Crystal XI: How to dynamically assign a datasource


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,


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Aug 11, 2008 at 01:15 PM

    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:


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 05:09 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.