Delphi XE - calling Crystal Reports

不打扰是莪最后的温柔 提交于 2019-12-24 00:58:56

问题


How do we call Crystal Reports from Delphi XE? What version of Crystal Reports does Delphi XE support?


回答1:


There currently is no native support for Crystal Reports with Delphi XE. In the past what I have done was to create a small Delphi Prism application that ran my reports using the .net framework API that they do support.

If your adventurous you can also write a small wrapper that exposes the crystal reports .net framework API via com and then call that from within your Delphi XE application.




回答2:


The last official VCL component for Delphi from SAP (Business objects) is for Crystal XI (11) and Delphi 7. There is a patch from Nils Dzubiel for Delphi 2009 (unicode) which works with Crystal XI. You can ask him to send you his version on embarcadero forum:

https://forums.embarcadero.com/thread.jspa?messageID=114133

This patch also works with Delphi 2010 and XE. It's not 100% stable, but it works OK.

You can design reports with Crystal 2008, but for runtime you have to install Crystal XI, because 2008 doesn't come with crpe32.dll API interface.




回答3:


I've been struggling to get somewhere with Crystal Reports and Delphi XE. After numerous failed attempts, I tried installing the old VCL component. As most know already, that fails. I found the point of failure to be the references to bdertl and related components. It took some thinking and some work, but I now have the Crystal Reports controls in Delphi Berlin 10.1. The application compiles and starts up okay, but running a report still has an issue. I'm reasonably confident I can work out the issue, but it will take more of the same.

Some of the items to modify in the Crystal VCL component: - UCrpeUtl.pas -- change the GetCommonFilesPath to properly reflect the registry path. Watch the version check code. - UCrpe32.pas -- correct the version check to look for the proper version -- see TCrpe.LoadEngine section.

When attempting to install the CR components, follow the instructions for earlier versions of Delphi. Compile dcl7cr11.dpk. Note the errors and start to work BDE references out of the code. Commenting the bdertl reference in the early code will help getting the other problems to appear. Watch for references to Ttable - eliminate that routine. I changed the name to Don't... There is a reference to ToString that seems to conflict with an existing reference by that name. Change this reference to 'ToAString'.

I'm still working on it, but I have a good deal more confidence in finding a solution with my recent successes.

Eric D



来源:https://stackoverflow.com/questions/3911912/delphi-xe-calling-crystal-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!