cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed to load a viewer control in Access

Former Member
0 Kudos

Hi,

I'm having a problem viewing a Crystal Report in Access. The code looks like this:

Dim crApp As New CRAXDRT.Application

Dim crRep As CRAXDRT.Report

'load a standalone report created in the designer

Set crRep = crApp.OpenReport("c:\fax\database\reports\PO.rpt")

CRViewer91.ReportSource = crRep

' print preview

CRViewer91.ViewReport

I'm loading CRADXDRT from CRADXDRT9.DLL. The report viewer control is called "Crystal Report Viewer Control 9, which i believe is coming from CRVIEWER9.DLL.

When I step through my code, CRADCDRT seems to load fine, however when I execute the CRViewer91.ViewReport step, the program seems to execute the code, but doesn't display any report.

My question is: am I using the correct control? I have CR9 and 11 on my system. I also have VB, which I believe also has a version of CR. I'm trying to use 9, which is what the report was written in.

Thanks for your help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

There are a number of questionmarks in your post that should get resolved by using CR XI. For example, CR 9.0 is a stand-alone version of Crystal Reports. CR 9.1 is a .NET 2003 / 2002 bundle and is not licensed to be used in COM applications. So, it looks like you may be mixing versions of craxdrt and crviewer. E.g.; if memory serves right, version 9.0 of cr had craxdrt9.dll and an associated viewer called crviewer9.dll. Somehow, you will have to resolve all the version differences. Since you have CR XI, I'd recommend using that as CR XI is backward compatible.

Ludek

Former Member
0 Kudos

Hi, Ludek,

Thanks for your response.

The reason that I'm using CR9 is that I know that is a Developer Edition. I'm not sure what version CR11 is - it may just be a Standard Edition.

If it is a Standard Edition, do you know if I will have the necessary dll's and controls? If so, I'll uninstall version 9 and just use version 11.

Former Member
0 Kudos

I figuered out the problem. Thanks for your help.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello There

I have a related question: is it possible to programm reportvieuwer 2008 with VBA from within Access??

Greetings from Netherlands

Ynte jan

former_member183750
Active Contributor
0 Kudos

No it is not. The crviewer was part of the RDC which is now retired. The last version to ship the RDC was 11.5.

See the [statement of direction|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/80bd35e5-c71d-2b10-4593-d09907d95289] for more details.

Ludek