cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reference for CrystalReports.Engine.ReportDocument object class

mbenigni
Explorer
0 Likes
6,238

Hello, all.

I'm trying to build a simple VS2022 test application integrating the trial version of CR2020. There is effectively one line of code:

Dim CrystalReportSource1 As New CrystalDecisions.CrystalReports.Engine.ReportDocument

Which is returning an error:

BC30002 Type 'CrystalDecisions.CrystalReports.Engine.ReportDocument' is not defined.

I need to know what reference to add or Import in order to be able to use this ReportDocument object class (or an alternate object class name, if this has changed to something outside the CrystalDecisions namespace.) I've tried a number of Crystal Reports 14.0 references that looked promising but didn't help. And in previous (CR2008) versions of this same project I had successfully used the following Imports statements, but the targets are no longer found:

Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.ReportSource
Imports CrystalDecisions.CrystalReports.Engine.ReportDocument

Thanks in advance!

View Entire Topic
DonWilliams
Active Contributor
0 Likes

Crystal Reports installer no longer includes the .NET runtime.

You need to get it from here:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

Download the CR for VS 2022 or above EXE, it will prompt at the end to install the 32 bit runtime, click OK.

Note you must install using Run as Administrator by right clicking on the EXE.

Don

mbenigni
Explorer
0 Likes

Thank you for your reply, Don!

I've already installed CR for VS2022. I believe I would have selected a 64-bit runtime however (if there was an option), since I'm running CR2020 and not CR2016.

Is there some way to confirm that this is configured properly? And should I be looking for specific reference(s) to add in my VS project? Note that the project does currently build with the CrystalReportsSourceLib Imports statement.

If it would help, I could also post my VB.NET source code. A very simple example would illustrate the functionality I'm trying to duplicate from our old CR2008 application.

Best,
Marc