on 06-08-2016 11:27 AM
I get the following error while opening a report.
Also please note that, i have already installed the cr runtime environment (version 13) in the target machine.
System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()
Kindly help
Please Try searching first, this has been posted 100's of times, likely you have your project set to AnyCPU and the OS is 64 bit so MSIExec detected it an installed the 64 bit runtime. Your project is likely meant to run in x86 mode.
CR Redist packages are set for your project platform and not the OS platform.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have passed the login information for the crystal report through code, which is put below. But when i install the software in a client machine and try to open it, the login is again asked.
The following code is used for internal login.
CReport.SimpleCrystalReportViewer simple = new CReport.SimpleCrystalReportViewer(); //
simple.Show();
CReport.EmployeeVisaDetail report = new CReport.EmployeeVisaDetail();
TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
Tables CrTables;
report.Load();
crConnectionInfo.ServerName = db.ServerName;
crConnectionInfo.DatabaseName = db.DataBase;
crConnectionInfo.UserID = db.UserName;
crConnectionInfo.Password = db.Password;
CrTables = report.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
{
crtableLogoninfo = CrTable.LogOnInfo;
crtableLogoninfo.ConnectionInfo = crConnectionInfo;
CrTable.ApplyLogOnInfo(crtableLogoninfo);
}
simple.crystalReportViewer1.ReportSource = report;
simple.crystalReportViewer1.RefreshReport();
simple .crystalReportViewer1.Zoom(1);
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.