I didn’t want to be an authority on using the Crystal Reports ActiveX components in Delphi. I don’t like Crystal that much, and the care and feeding of ActiveX controls isn’t something I do recreationally. But I have in the past confessed to using the Crystal RDC — my company made me do it, I swear — and so people occasionally send me questions about them. For the benefit of anyone else compelled to use these things, here are my answers.
Q:I am looking at CR XI and I see some differences in COM model which are confuse me at this point. For example, I cannot locate TCRViewer.
A:TCRViewer (the ActiveX component would be called "CRViewer"; "TCRViewer", with the "T" is the Delphi VCL wrapper class) is a version 8 component. You probably want to use something newer, especially if you are using Crystal XI. Also, the viewer control is in a separate type library from the RDC itself and this must be imported separately. For Crystal 9 (which is what I’m using presently) we use the CRViewer9 control; look for "Crystal Report Viewer Control 9" in the Import Type Library dialog box. All this may sound like a pain, but it’s actually a fairly good design, as it facilitates multi-tier applications. The RDC, which connects to the database, and the viewer, which shows the report to the user, need not be on the same tier.
Q:Do you use CR XI and RDC? Do you know any good sample project for integration RDC in Delphi applications: Create/Edit/View
A:As I mentioned above, I use Crystal 9 right now. But I’m happy to supply a demo application which shows how to view reports with both ODBC and ActiveX RecordSet sources and change the SQL at runtime for the former. I don’t do anything with creating or editing reports because doing so means that you must pay BusinessObjects a royalty for each copy of your application that you ship — or at least that is the terms for Crystal 9; I haven’t yet examined the Crystal XI license.
If you have any other questions, post them in Feedback, below, and I’ll update the article
{ 37 } Comments
Thank you, now I found a class and were able to link Crystal Reports into our reporting system (which now supports both Report Builder and CR).
Yes, samples will be great, I even can host them or CC submission will be great to.
I am working on some articles about this and your samples will be good addition to it.
CR XI Dev now comes with 750 clients installation free before you are asked to became OEM partner. Still it is only "virtual" control over licensing. In many cases client already has CR installed and then licenses counted differently.
Anyway, thank you
Serge, note that there is a sample app on CC linked in the article above.
Oh, I see it. Unfortunately format does not indicate link "a demo application" very well, only when hover over it.
Thank you
Hi ,
I have problems to download or even view the demo app.
Is there another way to reach that page
Thank you
If you are unable to download the sample app on CodeCentral, please do this:
1) Report the problems you’re having on the Borland.public.bdn.codecentral newsgroup
2) Use the "Contact" link on the sidebar to email me, and I’ll send you the sample app via email.
I don’t now if anyone of you can help me or now where can I find some help about my problem. I am trying to use "Crystal Reports 9 ActiveX Design and Runtime Library" using Import Type Library dialog box but I get this error: "A class named ‘TDatabase’ is already installed"
look for "Crystal Report Viewer Control 9" in the Import Type Library dialog box
Pablo, try pressing "Create Unit" instead of "Install" in the TL Import dialog. You don’t need to put the RDC components on the component palette.
However, you *do* want the viewer components on the palatte. So you should use Component->Import ActiveX control for that.
hi i have example for Delphi and crystal (please send to my id ((saeed_rayane)))
I was checking out the licensing for the Developer Edition of Crystal Reports, and it says this:
———————————
Licensing conditions for integrating reporting components into thick-client applications
Developers can integrate 750+ royalty-free report viewing, printing, and modification APIs into thick-client applications and deploy or redistribute these applications at no extra cost.
———————————
I believe this means that as long as you don’t distribute the actual report, but just allow the user to design and view reports within your program, that you don’t have to pay additional licensing fees.
Can I create a crystal report (.rpt) file at run time with asp.net application?
or
Can the user create their own .rpt file with Report Design Component in asp.net application?
I’ve never tried it, but I’d imagine you’d want to use one of Crystal’s web-based tools rather than the RDC for that.
Hi EveryBody
I would like to know how could I launch a crystal report (with parameters: selected cells, user prompt) from microsoft excel through vba using rdc. I use CR 8 and excel 2003. In fact I’m migrating an Access database with an excel interface and access reports to an sql server database interfaced with excel and crystal reports.
Thnx for any help
Nota: I downloaded the sample files on the website but it doesn’t work (the .ppt works well but not the access database!)
Have a nice day
"mo3ez" I’ve never used CR from VBA, only from Delphi, so I can’t help you with that.
hi..according to ur post, actually, is it really Crystal Report Xi doesnt provide us wit the CRViewer? and can we use the CRviewer of version 10?
i got an error message indicate a TLV error…
besides that, i wan to know, where can i get the components or cx or references for crystal report, if the user PC doesn;t had crystal report installed?
i’m using VB 6,Crystal Report Xi, and MySQL
Pls get back to me if any of u can help me solve this problem..
your help will be appreciate most..
rgds,
sanchoon@hotmail.com
Hi EveryBody
I would like to know how could I launch a crystal report from SQL Server through Delphi using rdc. I use CR 9 and SQL Server 2000. i had download demo app. it’s not running. i can find component CRAXDRT_TLB. how can i add that component to delphi ?
Thnx for any help
"Riz"
Please read the CC description:
"Note that you *must* import both the RDC and CR Viewer 9 type libraries before opening the project in Delphi."
These are ActiveX controls. Use Project->Import Type Library -> Create unit for the RDC and Component -> Import ActiveX control for the viewer.
Hi,
I used Delphi 6 and Crystal report 8.5 Active. The report links Word Document as OLE object. The problem is some computer did not show Word Document. Any Idea?
Thanks in advance.
Qin
qyang2000@hotmail.com
Qin, try running the same report on the same computer with the free Crystal viewer. Does it work then? If not, then the problem is a Crystal issue and you can eliminate Delphi from consideration.
I would guess there is a problem with the Word ActiveX control on that machine, but it’s only a guess.
Hi,
Previously I worked in Delphi 5 and Crystal Report 8 & Quick Report. Now I wish to use Delphi 7 and Crystal Report 10. How can I use the Crystal Report File generated separately ?
Thanks
Nuzibul
Nuzibul,
You:
1) Write the report you want to run using the Crystal designer.
2) Run the report using the ActiveX control, as demonstrated in the sample app linked in the article.
Unlike QR you do not design the report in the Delphi IDE (at least, not with D7).
Pam, I can really only help with Delphi integration with CR. I’m not an expert on CR report design.
Trying to use CRXI with Delphi 6. Are these compatible. No CRViewer (previous component from Crystal 8.5), however there is a CrystalActiveXReportViewer component for XI.
Hi,
I’ve successfully installed CR 8 web component manager. The problem that im facing is that the user name and password can’t be verefied with the database.
When i user CR 8 its working fine.
Can you pls help me.
Sal, I only use the RDC, not the web stuff. I can’t help you with that since I’m not familiar with it.
Hi,
I’ve got a problem with my CrystalActiveXReportViewer in Delphi. I Use Delphi 2005 with CRXI.
My application is using the ActiveX to preview the report, and it works well for that. However, when I want to click in it to select the textobjects (in a blue rectangle), it just doesn’t work. Nothing happens.
With the exact same project, on another computer, the same manipulations does select the textobject. Any ideas on why it’s not functionning properly?
Jonathan, I can only guess. My first instinct is to look at the labyrinth of DLLs used by Crystal/the RDC. The RDC and the viewer are two separate controls which have their own DLLs and also use additional DLLs to actually run the report. At my company we have updated the DLLs with hot fixes from Crystal / BusinessObjects in order to solve certain bugs we experienced. So the first thing I’d do is walk the DLLs loaded in each process and record the version numbers. You can do this in code using the JCL debugging helpers, for example, or there are third-party apps which will do it for an external process. Record the version numbers for *all* libraries loaded into your process on each machine and compare the working machine with the non-working machine. Chances are good that one or more are different, and this would explain the different behavior.
this are informative and helpfull
I can’t access ReportSource.
‘TCrystalActiveXReportViewer::ReportSource’ is not accessible
Hi, I tried to export a report to pdf and use email, Most of the time,it succeed, and sometimes, it throw out exception. I can not find what’s the exception? Any Advice?
thanks
Dorothy
i am trying to install crviewer.dll in borland Delphi studio 2006. But an errocu occurs : ‘Error creating palette bitmap of (TCRViewer) : No Server registered for this CoClass’ repeating for the other Crystal components. What’s wrong please
Thanks
Dorothy, I’m not sure what the problem is since I see exceptions from Crystal as expected. That said, they don’t give a lot of information; Crystal errors are pretty obtuse. But you should get the message. Try a simple demo app and force an exception (e.g., bad DB login) to make sure your exception handling in your app is working correctly.
Manibad, sounds like your RDC isn’t installed correctly.
I am new in the field of software development.
Is it possible to create a software in visual basic and use crystal report for reporting purpose. My Question is this .Is this is necessary to install Crysta Report Software where we are using that software or we can add only some component with .exe file ?
Running Crystal Reports requires installation of the CR runtime.
VB6 will not be updated and VB6 code is incompatible with VB.NET. I wouldn’t recommend using it.
I’m trying to use the TCRViewer9 to view a report that I created using CR9 in Delphi.
When I try to set the source report if fails. What is the proper way to do this, this is my code:
CRViewer.ReportSource := ‘C:\UpgRpt.rpt’;
Monica, download my demo application for an example of this:
http://cc.borland.com/codecentral/ccWeb.exe/listing?id=23061
ReportSource is the IReport interface you get from Application.OpenReport. You have to open the file with OpenReport. You can’t directly assign it to the viewer.
Hi,
I use Delphi 6 and Crystal 8.5, but now i want to migrate to Delphi 2006 but i dont now how to install the component of Crystal inside delphi 2006
thanks
Norma
The ActiveX control works in D2006 just like it did in D6. I haven’t looked at the VCL control in D2006 and wouldn’t recommend using it anymore as Crystal/BusinessObjects doesn’t seem to be committed to updating it.
Post a Comment