Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crystal Report is not opening for 64 bit machines

My reports work fine on a 32 bit machine but won't open on 64 bit. 64 bit is required because loading data on one of the screen causes a memory issue - so it can't work on 32 bit.

  1. Windows 10 64 bit
  2. Installed Crystal Reports Tried installing 13.0.20(latest) and restarting PC but didn't work.
  3. Application Target Framework 4.6.2 (i even tried it on 4.0 but same error)
  4. Using Visual Studio 2017 Community (tried VS 2015)
  5. Platform x64 (not AnyCPU)
  6. Reports are being generated by passing DataTable, no active connection or ConnectionString in reports
  7. Error Message

enter image description here

Edit # 1

  1. Web.config includes useLegacyV2RuntimeActivationPolicy="true"
  2. DataTables in x86 and x64 are sameenter image description here

Edit # 2

Source Code for showing the report is

CrystalDecisions.CrystalReports.Engine.ReportClass c = new 
    CrystalDecisions.CrystalReports.Engine.ReportClass();

c.FileName = System.IO.Path.Combine(Root_Path, 
    "Reports", "Prod", mFileName);

c.Load();
c.SetDataSource(dt);  // dt => DataTable
c.SetParameterValue("prmSystemDate", Current_Date);

frmReportViewer v = new frmReportViewer();
v.ReportClass = c;
v.Show();

And frmReportViewer FormLoad is

private void frmReportViewer_Load(object sender, EventArgs e)
        {
            CRViewer.ReportSource =  ReportClass;
            //CRViewer => 
            //CrystalDecisions.Windows.Forms.CrystalReportViewer
        }

Have I gone wrong somewhere?

Edit # 3

DataTable on x86 and x64 are same. (saved the datatables in xml and both files are exactly the same).

Process Monitor shows that my program performs CreateFile operation on following files

C:\WINDOWS\Microsoft.Net\assembly\GAC_64\CrystalDecisions.Web\v4.0_13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\CrystalDecisions.Web\v4.0_13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll C:\WINDOWS\Microsoft.Net\assembly\GAC\CrystalDecisions.Web\v4.0_13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll C:\WINDOWS\assembly\GAC_64\CrystalDecisions.Web\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll

All fails with PATH NOT FOUND Result. It succeeds on

C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll

and then two BUFFER OVERFLOW occurs on this same file.

It only happens on x64. There is no operation related with CrystalDecisions.Web.dll on x86.

What does it indicate?

like image 291
bjan Avatar asked Jun 01 '17 07:06

bjan


People also ask

Is there a 64 bit version of Crystal Reports?

Resolution. There is unfortunately no 64bit version of Crystal Reports, and of Crystal Reports for Enterprise. There is only a 32bit version of Crystal Reports, and of Crystal Reports for Enterprise.

Is Crystal Reports 2020 64 bit?

The new system requires 64-bit connections: finally, you say! The majority of operating systems nowadays are 64-bit, meaning that SAP Crystal Reports 2020 can utilise the full power a 64-bit OS has to offer.

Is Crystal Reports 2016 32 or 64 bit?

SAP Crystal Reports 2016 (Designer) is 32-bit and can be used on both 32-bit and 64-bit operating systems.

How do I open Crystal Reports in Windows 10?

Step 1: Open the browser and navigate to this link. Step 2: Click on Products A-Z. Step 3: Scroll down to C. Then find for SAP Crystal Reports, developer version for Visual Studio.


Video Answer


1 Answers

This might not be an complete "answer" since you're still troubleshooting, and asking for help, but its too long for a comment. Of note, at this time SAP does not support VS 2017, and there is possibility that has something to do with this, but I've seen similar messages even back in VS 2010 so here goes...

Short guess add this to your app.config file:

<startup useLegacyV2RuntimeActivationPolicy="true"></startup>

or more specifically target .NET like:

<startup useLegacyV2RuntimeActivationPolicy="true">
 <supportedRuntime version="v4.0"/>
</startup>

Longer troubleshooting thought process. The error message usually would indicate that the DataSet (DataTable in this case) is not set at the time it is used in the report object. You could put a breakpoint there and see if this is true (where SetDataSource is used).

It might be that I am wrong here and there is a properly set DataSet even at that point, and the issue happens a little later in the viewer. I ran into issues like this a long time ago and if memory serves this was the route I took to track down a solution.

Basically my problem was the way the EXE was using ADO objects in the viewer. Without knowing everything about your project I would start down this path to debug.

Other questions would be does it work in VS 2015? Did it ever work in X64 and stop working? Does it work for other operations, like can you access the report object programatically, and it's only erring in viewer?

like image 184
Jason Hughes Avatar answered Sep 28 '22 11:09

Jason Hughes