Data Access Worldwide Knowledge Base
Article ID 2248 Article Title EXAMPLE: Using RDC with Crystal Reports 9 in Visual DataFlex 11.1 Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2248 KBase Category VDF11 Date Created 10/04/2006 Last Edit Date 10/05/2006
Article Text
QUESTION:
I would like to use the new RDC interface for Crystal Reports version XI available in Visual DataFlex 11.1 but I am still using Crystal 9... I tried it and it seems not to work with that version.
What should I do?
ANSWER:
The VDF 11 cCrystal class was created to be used with Crystal XI exclusively. You will need to take the following steps to create a class that uses Crystal 9 with VDF 11 instead of Crystal XI:
1. Copy VDF11.1\Pkg\cCrystal.pkg and cCrystalPreview.pkg, to cCrystal_9.pkg and cCrystalPreview_9.pkg and add "_9" to the Use statements for cCrystalCraxDdrt, cCrystalCDO32, cCrystalPreview and cCrystalAciveXReportViewer.
2. Generate 3 new Crystal 9 packages from
a. C:\Program Files\Common Files\Crystal Decisions\2.0\bin\craxddrt9.dll (cCrystalCraxddrt_9.pkg)
b. C:\Program Files\Common Files\Crystal Decisions\2.0\bin\Cdo32.dll (cCrystalCDO32_9.pkg)
c. C:\Program Files\Common Files\Crystal Decisions\2.0\crystalreportviewers\ActiveXViewer\crviewer9.dll (cCrystalActiveXReportViewer_9.pkg)
3. In all 3 generated packages replace cCom with cCrystal, except for cComAutomationObject and cComActiveXControl
4. In all 3 generated packages replace OLEcr by cr
5. Replace cCrystalActiveXReportViewer with cCrystalCRViewer9
6. 'Move' cCrystalReport from cCrystalCraxddrt_9.pkg to cCrystal_9.pkg by commenting it out.
7. Rename the cCrystal class in cCrystal_9.pkg to cCrystal_9
8. And finally change psProgID of cCrystalReport class to the value generated in cCrystalCraxddrt_9. psEventId remains unchanged.
9. If you want to register the new class in the studio, copy VDF11.1\Usr\Global\IDESrc\cCrystal.dfc and cCrystalActiveXReportViewer.dfc to your workspace's IDESrc folder, rename to cCrystal_9.dfc and cCrystalActiveXReportViewer_9.dfc and edit appropriately.
To use in existing report view: Change "Use cCrystal.pkg" to "Use cCrystal_9.pkg" and change the reference of cCrystal to cCrystal_9. Also, do not use both version 9 and XI classes in the same application.
Differences between cCrystal CRWXI and cCrystal_9 for CRW9:
1. RDC 9 does not show a logon prompt if explicit login is needed with MS SQL Server authentication. A report run on its own will show a login prompt, but through RDC it just throws an error. Works OK for trusted connections, though. See DAW KB ArticleID 2176 for a solution on how to provide a database login for a report.
2. Business Objects has extended the RDC between versions 9 and XI. As far as I have been able to establish, there are no differences in existing functionality except for bug fixes. Basic things, like viewing a report with selections and formulas created in VDF, work as expected. Still, all this needs a lot more testing, so: No guarantees that this will work for you.
Note:
Using RDC with a pre-XI version of Crystal Reports is not supported by Data Access.
Contributed By:
Igor van Houttum
Company: Data Access Europe
email: igor.van.houttum@dataaccess.eu
Web Site: http://www.dataaccess.eu
Web Links Related to this Article
DAW Knowledge Base article 2176: ERROR: "Logon Failed" using Crystal RDC
URL=http://www.dataaccess.com/KBPrint.asp?ArticleID=2176
File cCrystal_9 packages.zip
URL=http://www.dataaccess.com/KBasePublic/Files/2248.cCrystal_9 packages.zip
Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.
The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.