• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1643
  • Last Modified:

previewing report using RDC in crystal reports 9

Al trying to automate crystal reports using Microsoft vc++.My application works perfect with old versions of crystal report.But With the version 9 i have a problem in previewing the report.
I studied that the  crystal report version 9 comes with a new automation server Craxdrt9.dll instead of CPEAUT32.dll.
Inorder to upgrade my application i had to find out the new dispatch IDS of the “CrystalRuntime.Application” automation server.
I got the  Dispatch Ids of all the methods by opening the CRAXDRT.TLB file in OLE/COM object viewer.

But i am unable to get the dispath ID of the preview function which was working perfectly with the old automation server.Can anybody give an expert advice on this.AM STUCK:(
Thanks in advance
1 Solution
Did you try using the old method with CR9?  I was under the impression that the automation engine was still there.

What code are you using?

Take a look at


kaljessAuthor Commented:
I did some Research on it and found
The crystal report version 9 does not have a Report Engine Automation Server component unlike its previous versions. It has Report Development Component and Crystal Reports Viewers for the same purpose.
The only way to upgrade crystal reports to version 9.0 is to migrate from Report Engine Automation Server component suite to those of the Crystal RDC (Report Development Component).

For reference see

Changes to be made to migrate to crsytal report 9.0(vc++ environment)

The new Crystal reports Report Development Component“CrystalRuntime.Application” (Craxdrt9.dll) has to be used instead of  “Crystal.CRPE.Application”
(CPEAUT32.dll) for automating crystal reports from CIS

To accomplish this Modify Initialize () function in Qcrystal.rpt

BSTR b = T2BSTR ("Crystal.CRPE.Application");


BSTR b = T2BSTR ("CrystalRuntime.Application");

Get exact Dispatch ID’s of  Report Development Component

Dispatch ID’s are used to access exposed automation server’s objects and also to invoke their methods.

An analysis revealed that the Dispatch ID’s of Craxdrt9.dll (version 9) and CPEAUT32.DLL (old version) differs making the automation process for crystal reports version 9.0 fail in CIS.

Dispatch Ids can be obtained by opening the CRAXDRT.TLB file in OLE/COM object viewer.

Also to retrieve the descriptions of objects, collections, methods, and properties of Report design automation object download

The Dispatch Ids can also be retrieved using the GetIDsOfNames () function.


InvokeHelper (0x5, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, ReportFileName);


InvokeHelper (0x120, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms, ReportFileName);

Replace all the old dispatch IDs with new dispatch IDs

PAQed, with points refunded (20)

Community Support Moderator

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now