cancel
Showing results for 
Search instead for 
Did you mean: 

VB6 and CR XI R2

Former Member
0 Kudos
352

I have a VB6 application that includes the Crystl32.ocx from version 8.5. I have CR XI Developer, and recently upgraded to CR XI R2 for some Visual Studio 2005 applications I have (VB.NET).

I cannot upgrade the application from VB6 to VB.NET, but I am trying to get all of my applications on CR XI R2. Can someone tell me which component I would need to include in my VB6 project to eplace the Crystl32.ocx?

Thank you,

Jack

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Jack,

You will need to migrate your VB6 application to the Report Designer Component (RDC) object model. The Crystal OCX (crystl32.ocx) that was available in CR 8.5 was retired after CR8.5.

There are a number of documents that will help you with the code migration. Here are some links:

[RDC Tutorial for CR9|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/105181db-cb1d-2b10-38a4-b0a30e268e40|RDC Tutorial] - applies to CR 9/10/11/11.5.

[Migrating from the OCX to the RDC in CR9|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0266ff1-261f-2b10-0284-e45e1568431e|OCX to RDC Migration Info] - this document has a nice appendix at the end comparing methods and properties between the OCX and the RDC.

Upgrading from CR8.5 to CR9/10/11/11.5 is essentially the same. The above documents were written for CR9 specifically; however they will work for CR10/11/11.5. You will have to make minor adjustments to account for DLL file name changes (e.g. crviewer9.dll in CR9 vs. crviewer.dll in CR10/11/11.5).

You will also want to review the changes to [database connectivity|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0003c6cc-891e-2b10-678e-8b1a2dd96556|Database Connectivity] at runtime from earlier versions of Crystal Reports compared to CR XI / XIR2.

Here's the link to the [Online SDK Library|https://boc.sdn.sap.com/developer/library|Developer Library] - scroll down to the bottom of the page for the XI Release 2 Productivity Pack and Service Pack 2 link. These SDK Libaries include the RDC SDK.

[RDC 10 Sample Applications|https://smpdl.sap-ag.de/~sapidp/012002523100006012702008E/rdc10_smpl.exe|RDC Sample Applications] - should be able to upgrade to XIR2 with few issues.

Please note that the RDC has been retired with the release of Crystal Reports 2008. Crystal Reports XI Release 2 (v11.5) is the last version of Crystal Reports that is shipping with the RDC. While you can migrate your application to the RDC for CR XI R2 you may want to start planning for future releases of your application since the RDC will no longer be available. The upgrade path for the RDC is to move to the CR .NET object model. Here is the [RDC Statement of Direction|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/80bd35e5-c71d-2b10-4593-d09907d95289|RDC Statement of Direction] link.

I hope this help.

Sincerely,

Dan Kelleher

Former Member
0 Kudos

Is the RDC the only option? Is there not a simple viewer available? I only need viewing capability, but I need the reports to be dynamic at run time.

Thank you,

Jack

Former Member
0 Kudos

Hi Jack,

In VB6 with CR XI R2 the RDC is your only option. The RDC is some what similar to the OCX - it's just a more fully architected ActiveX control.

Sincerely,

Dan Kelleher

former_member183750
Active Contributor
0 Kudos

If you are only looking to view a report (no db logon), you'd be able to get away with this code:

Dim myApp As New CRAXDRT.Application

Dim myReport As CRAXDRT.report

Set myReport = myApp.OpenReport(CommonDialog.FileName)

Crystal ActiveXReportViewer1.ReportSource = myReport

Crystal ActiveXReportViewer1.ViewReport

Ludek

Former Member
0 Kudos

This looks much closer to what I am looking for (it is close to my existing code for 8.5), but what component do I use?

Thank you,

Jack

Former Member
0 Kudos

Hi Jack,

You follow the steps I outlined in my initial post. The RDC is close to the OCX, but you still have to develop the application using the RDC.

Sincerely,

Dan Kelleher.

former_member183750
Active Contributor
0 Kudos

In VB 6 add references to Crystal Reports ActiveX Designer Runtime Library 11.5 and Crystal ActiveX Report Viewer Library 11.5. Once you do this, you will see the viewer icon in the toolbox, throw the viewer on the form and code.

Also, see the developer help file:

C:\Program Files\Business Objects\Crystal Reports 11.5\Help\en\rdcsdk_com_dg_doc\doc\rdcsdk_com_dg.chm

Ludek