Link to home
Start Free TrialLog in
Avatar of Rob Rudloff
Rob RudloffFlag for United States of America

asked on

What's the latest version of Crystal Reports that works with VB6?

Hi.
From what I've been able to find, it seems that Crystal Reports XI (release 1) is the last version of Crystal Reports that worked with VB6 using an OCX.

Can anyone verify this?

We need to upgrade CR to a more current version, but we must keep the VB6 code for now.  We tested it with CR 10.5 and it seemed to work fine, mostly because the DLL's and OCX files were named the same (just newer versions).  We only had to open the old .rpt file with the new version of CR and save it, and all was well -- I am hearing those details third-hand, so that may not be exactly right, but if anyone has any insight, please share ...

Thanks!
Rob
SOLUTION
Avatar of Brook Braswell
Brook Braswell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That being said -
Reports created with CR 2008 still run with the XI libraries in VB6.
I do believe you would need to check your license agreements to make sure you are permitted to do that.
Avatar of Mike McCracken
Mike McCracken

The last version that runs with the OCX is CR8.

CR XI R2 runs with the RDC.

If you ask Crystal, the answer is no you cannot use CR2008 and later report files with the CR XI dlls.  They didn't chage the report file format so they will work but you won't be able to access the new features so there is no real advantage to upgrading.

mlmcc
Avatar of Rob Rudloff

ASKER

So that I explain myself more precisely ....
In our VB6 project, we have no "references" to anything Crystal.
In our "Components" under "Controls" we reference a "Crystal Report Control" which is "C:\Windows\system32\crystl32.ocx" which is product version 6.1.0.000

So, we have the Crystal control on the form, and we reference it in the code something like this:
    rptCrystal.Connect = gsCrystalConnectString
    rptCrystal.StoredProcParam(0) = mlValue1
    rptCrystal.StoredProcParam(1) = mlValue2
    rptCrystal.Formulas(0) = "ToDate='" & lsSomeValue & "'"  
    rptCrystal.ReportFileName = "MyReport.rpt"
    rptCrystal.Destination = 1
    rptCrystal.WindowState = 0
    rptCrystal.Action = 1

Open in new window


So, ultimately we want to upgrade Crystal Reports without changing the code -- we have several hundred reports coded this way in this app.  Hence, my question about which version of Crystal we could upgrade to without too much pain.  So, I assume we are not using RDC and are using OCX in this app, if I understand it correctly ...
Since I can't find any trial downloads of these older versions, I'm going to have to buy it (Developer version) and hope I can get it to work   :-/
You are not using the RDC.  That is the OCX.
Here is a link to help you migrate
http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/d0266ff1-261f-2b10-0284-e45e1568431e

You may be able to buy CR8.5 from SAP/Crystal.
http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&CategoryID=20036700?resid=2tVABQoBAiMAADjsUX4AAAAD&rests=1296682886706

You can download the free trial of CR XI here
http://www.sap.com/usa/solutions/sapbusinessobjects/sme/freetrials/index.epx

There was a major report file format change with CR9 to accomodate unicode among other things.  The OCX was dropped at that point in favor of the RDC.  The RDC was dropped after CR XI.

mlmcc
OK -- here's some info I got from a developer here who's been fiddling with this --
We opened an old v.6 Crystal Report  with CR XI and then saved it, thus "updating" the report.  Then, we swapped out an old CR(v6) .DLL (i will have the name soon) with the newer version from XI, and, voila! -- the old VB6 code could open the CR XI report.  It's cheating, I know ... and seems a little crazy for a distributed "corporate-scale" app
The next issue will be trying to get the files right for the distribution kit.

@mlmcc -- I'll read that document you linked to.  I tried to download the CR XI, but it gives me R2, which I am told is not going to work at all -- but maybe I'll give it a try tonight.

More later ... thanks
I have CR XI R2 and I just built a simple viewing application in VB6.  It works just fine.

mlmcc
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the code.  I'm going to play with that today -- we were seeing how easy it was to convert old CR6 reports to CR2008, but hit a snag -- I think we've got it figured out now.
... which I'm reading is asking for trouble, since there is no more "CRAXDRT.DLL" in CR 2008.

Although, I see people somehow using the CRAXDRT.DLL from 11.5 to call reports created in CR2008.  Some developers also mention "CRAXDDRT.DLL" that gets installed with CR2008, but I haven't researched that yet ...
Any insight into this, or should I bail on CR2008 and go back to 11.5, since I'm stuck in VB6 land ?
Nevermind, I understand what CRAXDDRT.DLL is.
CRAXDDRT is a superset of CRAXDRT, however it requires a separate runtime license for each machine it is installed on if you use certain functions.  

Since you will not be able to use the new features of CR2008, I would revert to CR XI just to avoid issues where you build a report using one of the features.

mlmcc
Looks like we are settling on CR XI, and will change the code (on about 80 forms!) --
We will remove the old ActiveX control, and make a single "crystal report form" that we will call from all the old forms, passing the name of the report and any parameters we need for the report.
I will do a search on EE to find some sample code to make this "report form" ...
-- thanks
-- rob
The code i provided above works with CR XI and the RDC.

Do you need other capabilities like parameters?

mlmcc
Yes -- we typically send parameters and "formuls" to the reports, like this:

    '-- connection string for MSSQL ...
    rptCrystal.Connect = gsCrystalConnectString

    '-- Report is attached to a Stored Proc, not a table, so 
    '-- we submit the procedure's parameters to the report ...
    rptCrystal.StoredProcParam(0) = mlValue1
    rptCrystal.StoredProcParam(1) = mlValue2
    
    '-- how we update a text "label" on the report at run-time,
    '-- by updating a formula that exists on the report as a text box ...
    rptCrystal.Formulas(0) = "ToDate='" & lsSomeValue & "'"  

    rptCrystal.ReportFileName = "MyReport.rpt"
    rptCrystal.Destination = 1
    rptCrystal.WindowState = 0
    rptCrystal.Action = 1 

Open in new window


The linkk I gave you above is a good start
Here is a link to help you migrate
http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/d0266ff1-261f-2b10-0284-e45e1568431e


If you have specific problems ask another question

mlmcc