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

Migrating from CR9 nowadays

padamnet
Explorer
0 Likes
1,090

Hello

I am looking for a solution to the following situation:

Quite a few years ago I developed a VB.NET project (Windows desktop application) using the Visual Studio 2005. As a reporting tool I used Crystal Reports 9. The project was designed to load the CR9 reports from an external folder and worked very well.
A year ago, I migrated succesfully this project using the Visual Studio 2022 without changing the way CR9 are loaded. In order to make the old reports run, I found in the Internet the CRRedist2005_X64.msi and CRRedist2005_X86.msi. After running them in the target machine the old reports displayed normally.
This is the story up to now. I know what you may think: this is not the normal developer's way in the year 2024. OK I agree.
Well here is my real question as I do not want:
a) to import and embed these reports into the VB.NET 2022 application for various reasons
b) neither I want to redesign them as they are many

According to your experience what would be the best way and route to go out of this situation?
Thanks a lot
Panagiotis Adam

Accepted Solutions (0)

Answers (2)

Answers (2)

padamnet
Explorer
0 Likes

Hello Don

Thank you for answering to my question.

Below are some more info for my application:

My PC is a DELL Inspiron 3020 with Windows 11 Pro.

I am also using Microsoft Visual Studio Professional 2022 (64-bit) - Current
Version 17.7.5  with NET Framework 4.7.2. for developing Windows VB.NET applications for any CPU target platforms.

Recently I successfully migrated my VB.NET 2005 projects with the help of Microsoft Visual Studio Professional 2022 , NET Framework 4.7.2. Now all my applications can be recognized and operate in the new VS enviroment. I mean all the Windows forms communicate normally with the used datasourcses i.e. OLE DB Connections in conjunction with Microsoft SQL Server. Up to this point everything works perfectly and all the CRUD db operations behave ideally. This is a good success audit point and shows that the VB.NET apps work well in the development machine and also to the target machines with the help of the MS Setup deployment wizard.

The real headache is the reporting system. I am theoretically aware about the reasons that cause all the trouble in my reports. All my CR reports are designed with the CR 9 version with all the consequences and the impact to my projects. Business Objects has passed all the iknow how to knowledge to SAP which in turn means new SAP driver files etc. I must mention that there is no Technical Supporter/Represantative for SAP Crystal Reports in Greece where I live.

So which root do you think should I take so that these reporting problems will be vanished?

As I am not designing my reports into the VS enviroment, can I keep using the old Crystal Reports 9 application for designing new reports or updating existing ones?

Do I have to replace all the references of my applications to Crystal Decisions to anothers?

What CR restributables should I deploy to the target machines?

These are my questions for now.

I really appreciate your help.

Regards

Panagiotis Adam

 

 

 

DonWilliams
Active Contributor
0 Likes

Here's some more info for you...

Platform Support for CR for VS:

https://www.sap.com/documents/2016/06/f871031e-757c-0010-82c7-eda71af511fa.html

Go here to get the EXE to integrate CR for VS into VS 2022:

https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html

To assist you upgrading your Project see this Blog I wrote:

Upgrading a Visual Studio 2008->2022 .NET project with the latest CR .NET SDK packages

On the page above see this info:

Related Documents

Crystal Reports for Visual Studio Licensing

Getting started and moving ahead with Crystal Reports .NET applications

See this Blog for instructions upgrading your existing project to the latest SP

See this blog on how to use CR 2020 Export to XLXS page formats:

How to use the new CR 2020 export to Microsoft Excel(XLXS) in Visual Studio .NET code (new)

how-to-parameters-in-crystal-reports-for-visual-studio-net

Printing Crystal Reports in .NET

SAP Crystal Reports for Visual Studio Installation Guide ( SP 21 and above)

Note the References are updated as well, VS should simply replace them, also note there are 2 Assemblies you no longer need, those are for BO Enterprise to connect to the CMS for Managed Reports, you can simply delete them from your list, CR for VS no longer supports CRS/BOE, they have their own .NET packages:

CrystalDecisions.Enterprise.Framework

CrystalDecisions.Enterprise.InfoStore

Once you have converted your Project, don't just use the MSI packages to get the assemblies, use the EXE to integrate into VS, separate MSI packages can be downloaded from the link above to include in your distribution package. And no you cannot manually distribute CR runtime, the MSI's must be installed using an Admin account.

As noted CR for VS .NET runtime platform is set to your Project, X86 or X64, using AnyCPU can cause Boot Strapping issues which could cause the wrong MSI to be installed.

As for MS SQL Server, Microsoft did update the Client Dll so to get CR to recognize them you will need to manually update each report. Unfortunately the only way to update the Reports is to do this within CR Designer, at  he same time is also updates the version of the RPT file and "fixes" any updates required in the formatting of  the RPT file itself. Best to hire a student to do this for you if you have a lot....

I don't recall now, I'm retired now, but see if exporting the Reports to Crystal Reports format saves the updated the Client info, you can use ReplaceConnection() API to update the client info, it saves data with the report but you could them open each report and discard saved data and resave them. It how will not verify the reports are working as expected. You can VeryDatabase() in code but not easy to catch error.

If you note the Client Dll used in CR Designer you'll see it's a file called crdb_oledb.dll. The CR File name has not changed but of course the internals to recognize the updated MS DB Client was added, this info is saved in the RPT file. CR dynamically generates the SQL based on the Client used, so if it's not recognized CR will default to a generic SQL that MS may not fully support. This may cause some of your reports not to function properly.

On the download page there is a Test app I wrote for Parameters, it has other feature to verify Formula, this may help in catching potential errors also.

You can then use a flagging routine to check if the reports have been updated by using the Version history, here's an example of the Report history saved in the RPT file:

DonWilliams_0-1732461667846.png

Hope that answers all your questions and more...

Don

DonWilliams
Active Contributor
0 Likes

Hello,

The problem is the platform support for your app in VS 2022 and CR 9's database support.

See this for more info:

https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html

And the Platform support info:

https://www.sap.com/documents/2016/06/f871031e-757c-0010-82c7-eda71af511fa.html

CR for VS latest SP 36 supports Windows Framework 4.7 and 4.8. That VC 2005 runtime I believe is 1.x Framework.

The problem is CR has always been linked to Microsoft, so if MS end of life any of their products CR follows suit.

So to be Windows Compliant you must keep your app up to date.

I wrote a blog on upgrading to current versions:

Upgrading a Visual Studio 2008->2022 .NET project with the latest CR .NET SDK packages

Sorry it's C# but the same upgrade info relates to VB.

You don't have to embed your reports into the app. First link has a few sample app's to show you how to load the unmanaged reports from a folder.

As for the main potential issue you may run into is the DB source you are using, ODBC, OLE DB, Native client etc.

CR embeds the DB client used to connect into the RPT file, so when you load the report it knows what Client to look for.

Depending on your data source depends on if you could have issues or not, CR dynamically loads the DB info on first load, open a report in CR 2020, 64 bit version and then Database, Set Location and connect to your data source.

Click on Verify Data Database, if any messages or database mapping UI pop's up then you have no option but to update each report manually. Unfortunately the DSK is not capable of updating the Data source, it can do it at run time but the updated info will not be saved in the Report.

So I can't say what possible issues you may have without more details.

All I can suggest is upgrade your app to VS 2022 using the 64 bit installer:

CR for Visual Studio SP36 64b installer (VS 2022 and above)

And set your Framework to 4.7 or 4.8, only one supported now.

Run your app and see what happens.... Note also you should set the Platform to x64, don't use AnyCPU, it can cause install problems on users PC's. CR uses the App Platform and not the PC's platform, although not much of an issue anymore since most users us 64 bit Windows, 32 bit OS's are no longer supported.

If you do need to update your reports get CR 2020 and use it to do the updating, if there are that many reports hire a student to do it for you....

You can get CR 2020 here:

https://www.sap.com/products/technology-platform/crystal-reports.html#try-now

Note also that because CR 2020 is 64 bit your data source will need to support 64 bit Client.

Hope that helps?

padamnet
Explorer
0 Likes
I have removed all the old assembly references from my project and I am trying to add the new SAP assemblies in the project. I cannot find them.
DonWilliams
Active Contributor
0 Likes

Click on Add Assemblies and then Extensions:

DonWilliams_0-1732724991836.png

 

padamnet
Explorer
0 Likes
I am sorry but there are no assemblies there. Question: When these assemblies are installed in my PC? Do I have to buy any CR module in order this to work properly?
DonWilliams
Active Contributor
0 Likes
Then you did not look at any of the linkns I posted above. You have to download the EXE for your version of Visual Studio. Once you do that then you'll see them
padamnet
Explorer
0 Likes
I installed SP36, removed all the olds and installed the CR assemblies. Now the project runs in the VS enviroment, no errors, the CR reports are displayed BUT in cases where CR parameters are used, then records selection according to parameters is not operating, It seems that CR parameters are no passed in the report. As a result instead of printing the records of one customer, it prints the records of all customers
DonWilliams
Active Contributor
0 Likes

Have a look at the Parameter Test app:

Related Documents

Crystal Reports for Visual Studio Licensing

Getting started and moving ahead with Crystal Reports .NET applications

See this Blog for instructions upgrading your existing project to the latest SP

See this blog on how to use CR 2020 Export to XLXS page formats:

How to use the new CR 2020 export to Microsoft Excel(XLXS) in Visual Studio .NET code (new)

how-to-parameters-in-crystal-reports-for-visual-studio-net

Printing Crystal Reports in .NET

SAP Crystal Reports for Visual Studio Installation Guide ( SP 21 and above)

When Stored Procedures are used you MUST set the parameter values first and then set the DB log on info so CR can pass the Parameter values to the SP before logging on.

See if that resolves the issue.