cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report with Visual Studio 2022 .NET Objects connection

0 Kudos

I have installed Crystal Report for Visual Studio 2022, I use an old project built with ASP.NET Web Forms, with many reports created with previous versions, they work correctly but I cannot update the connections to the objects previously created. I can't create new reports using connections to existing .NET objects.

Always appears this screen:

Even if I choose the class as the path, still not works.

With new project created in VS2022 with new rpt and new class, works correctly.

With Visual Studio 2019 all works fine.

Anyone can help me?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Mattia,

R&D had a look into the issue, it appears to be a limitation in VS 2022:

There are some types and functions(which are defined in the LIBs for .NET Framework and used in our LIB(crdb_adoplus.dll), the error is reported as "System.MissingMethodException: Method not found " when opening the project with VS2022.

I have checked IDE in VS2022 and VS2019, I find that the LIB(mscorlib.dll in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8) will be loaded when opening a web site project with VS2019, it never gets loaded by VS2022.

The issue is about VS2022 or .net framework, DLLs in .net framework can't be loaded by VS2022, that is why it will report the error "System.MissingMethodException: Method not found ".

CR for VS can't create a web site project with VS2022 now. This appears to be a limitation when creating/using a web site project in VS2022.

Nothing we can do about this limitation, Microsoft will need to fix it.

As a work around use a full version of CR Designer to update and create new reports.

Note: the Embedded Report Designer is very old technology and only included for simple tests, if issues are found use the full version of CR Designer or run the application to verify it's working.

To get CR 2020 go here: https://www.sap.com/products/technology-platform/crystal-reports.html

Thanks again

Don

0 Kudos

Don Williams any ETA on that?

Answers (10)

Answers (10)

arjungunasek37
Explorer
0 Kudos

Any one facing the migration issue while connecting ODBC DSN 64 bit ,Build platform target x64.

Installed CR report for VS22 with sp33 and runtimes 32 bit, 64 bit.

Able to preview the report using the 64 bit ODBC connection.

But failing to see report (Blank PDF) in the Web Application.

0 Kudos

I don't understand, if I install the crystal report for visual studio sp33, the problem is solved or not?

0 Kudos

SP 33 is now available for down.

Note: this is a Microsoft bug so MS needs to fix it.

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

0 Kudos

Escalated now:

578126/2022 / Crystal Report for Visual Studio 2022 .NET Objects connection failing using ADO.NET

KBA - 3235319 - Crystal Reports for Visual Studio SP 32 - Visual Studio 2022 Embedded Report Designer selecting ADO.NET data source dll does not accept access to ClassPath

Should be a fix in SP 33 due sometime end of this year.... no date set at this time

So for now you need to create a Web Application project and it will work

0 Kudos

Can you update me in this post when this patch will be publicated?

0 Kudos

Hi Mattia,

I had R&D do a quick test and He discovered:

  1. If it’s a Web Application project(from menu File->New->Project, Web->ASP .NET Web Application), there will be no problem opening it in VS2022, report could work well with Project Data->.Net Objects in embedded CR designer.
  2. If it’s a Web Site project(from menu File->New->Web Site, ASP.NET Web Site), then it will be problem in VS2022.

He's still looking into a work around or if it requires a fix.

He also noted same issue in VS 2019.

I'll let you know.

Don

0 Kudos

Hi,

it's a Web Site project.

I'll wait for news.

Thanks.

0 Kudos

Curious, did you recompile your dll for 64 bit?

0 Kudos

Yes, I did it.

0 Kudos

Hi Mattia,

Ah that could be why, we had to convert the Embedded Report Designer to 64 bit and it may be an issue.

I'll let R&D know, would it be possible to get your Class and sample report so R&D can have a look into it?

If so for security reasons I'll send you a direct e-mail that you can send me the test app and report.

FYI - Then Embedded Report Designer is CR Basic, so it's limited in it's abilities.

For now download the trial version of CR 2020 and use it designing reports and purchase it:

https://www.sap.com/products/crystal-reports/technical-information.html

It may be 4 + months before this can be fixed, it they can...

Thanks again

Don

0 Kudos

Are you using Crystal Reports 2020?, it too is 64 bit so it should work there.

Or are you using the Embedded Report DEsigner in VS to set location?

0 Kudos

I'm using the Embedded Report Designer in VS

0 Kudos

UPDATE: if I put an old report in a new project, I can modify it normally.

0 Kudos

Did you install the CR for VS 64 bit version?

Is/are you using IIS or IISExpress to test?

Did you select IISExpress 64bit or put IIS in 64 bit mode for your AppPool?

Did you change the project to Build to x64?

0 Kudos

Yes, I've installed 64 bit version.

Th project buil correctly (and works fine, in development and in production).

The unique problem is I can't modify the old reports (but still work in play) with modified class. It compare always the window I posted when i try to modify "Expert database".

0 Kudos

UPDATE: if I put an old report in a new project, I can modify it normally.

DellSC
Active Contributor
0 Kudos

The older reports have 32-it connections, so that's what's stored inside them. Since VS 2022 is 64-bit, you need to make sure that you have the 64-bit database drivers installed. If you're using ODBC, you need to recreate the ODBC DSNs in the 64-bit ODBC administrator - they can have the same names as the 32-bit DSNs to make it easier.

-Dell

0 Kudos

Rpt are not connected to the database but to .net classes (.net objects) within the project itself.

Even if I create a new rpt (with VS2022) inside the old project the problem is the same.

If I create an rpt in a new project (created with VS 2022) it works.

So i think the problem only concerns the old project and not the installation of VS2022 / Crystal report.

DellSC
Active Contributor
0 Kudos

Which version of VS and the Crystal SDK does your old project use?

-Dell

0 Kudos

VS 2019 16.3.15 and Crystal version 13.0.4000.0

DellSC
Active Contributor
0 Kudos

I'm assuming that you've updated the database connections in your application and that they're working. Did the upgrade to the rest of your application work correctly?

I would look at the references in the application you created in VS 2022 and see whether they match what's in the older application. You may need to update some of your references - in particular, look at the versions of the CrystalDecisions references.

-Dell

0 Kudos

Yes, I've updated the references to the new libraries installed with 64bit installed.

Application works correctly, also old reports works fine, in development and in production.

The unique problem is I can't modify the old reports with modified class. It compare always the window I posted when i try to modify "Expert database".

DellSC
Active Contributor
0 Kudos

Have you tried using "Set Location" to change the connection of the report to the new 64-bit connection prior to trying to modify in the Database Expert?

-Dell

0 Kudos

Yes, the problem is the same, always the same window appears.