cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports for Visual Studio - Deployment Issue

0 Kudos

This is the third Crystal reports app I have created. I am seeing this error when trying to run the app on the client machines. I have run the msi setup file for both my app and the CR runtime SP 29. The error I am seeing is below. I have verified that CrystalDecisions.Shared.dll has been added to the dependencies for my setup file and as a reference within the app. Does anyone know what could possibly be causing this?

Application: M-Files - Planned Material Report.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.IO.FileNotFoundException

at CrystalDecisions.Shared.SharedUtils..cctor()

Exception Info: System.TypeInitializationException

at CrystalDecisions.Shared.SharedUtils.get_CurrentControl()

at CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture()

at CrystalDecisions.Shared.LocaleManager..ctor()

at CrystalDecisions.Windows.Forms.CrystalReportViewer.InitReportViewer()

at CrystalDecisions.Windows.Forms.CrystalReportViewer..ctor()

at M_Files___Planned_Material_Report.Form1.InitializeComponent()

at M_Files___Planned_Material_Report.Form1..ctor()

Exception Info: System.InvalidOperationException

at M_Files___Planned_Material_Report.My.MyProject+MyForms.Create__Instance__[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon)

at M_Files___Planned_Material_Report.My.MyProject+MyForms.get_Form1()

at M_Files___Planned_Material_Report.My.MyApplication.OnCreateMainForm()

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])

at M_Files___Planned_Material_Report.My.MyApplication.Main(System.String[])

View Entire Topic
0 Kudos

Hi Chris,

CR runtime is based on your app platform, x86 or x64, and not the OS.

So in 64 bit mode CR requires all 64 bit dependencies, including the database driver the report uses, if it doesn't exist in 64 bits then your app is not going to work.

Another thing you must not do is for all CR assemblies DO NOT set the Copy Local option, your app can be confused if your \bin folder has CR assemblies and they are in the GAC as well. You should not see any CR dll's in your \bin folder.

Open your report, click on Database and expand the properties, you'll see the name of the Dll CR is using to connect, something like crdb_ODBC.dll or crdb_ado.dll etc.

Which one is your report using?

Another test if your DB is supported in 64 bit is on a different PC download CR 2020, it's 64 bit only designer:

https://www.sap.com/products/crystal-reports.html?btp=0a62d81d-9ae0-475e-8079-8c4bd1dbc0ee

You can't have more than one version installed locally.

Open your report and try to preview it, if it works then you have all the piece, if you get a database error you don't.

Don

0 Kudos

This report was originally created with a ttx file so that is what I am using to populate the database fields in the report. I then fill the ttx structure with a dataset in vb.net. I looked at the properties of the ttx in crystal reports and I don't see anything indicating what dll it is using. Is the ttx what is causing the problem? Should i be creating a datatable from my dataset instead of using a ttx file to fill the report data structure? I do have the CR assemblies in the bin folder. What is the best way to remove these and only use the GAC assemblies? When I add a reference to the project for CR assemblies doesn't this add it to the bin folder?