0
votes

I can load a crystal report on my development system fine. But after I run an installer on a second computer I get "Load Report Failed".

I checked previous postings but no luck yet. I'm coding in Visual Studio 2017 visual basic. I did install the Crystal reports run-time on the remote computer and it helped get me past an earlier error so I think I'm close! Any ideas/help appreciated! After some digging I hard-coded the report name but still am not there!

Lot's of web searching, installed runtime on remote system and got further along. Shifted to hard coding report name/path (confirmed .rpt on client computer....do I just need the .rpt or the .rpt and .dll (have tried both but no change). Every change I tried works fine on my development PC but never on client PC. Tried most of the options from stackoverflow but no luck yet.

 Dim dt As New DataTable  
 Dim tempstring As String  
 Dim ncomp As Integer  
 Dim xx As Integer  
 'Created data block to pass to CR as dt, works on dev't PC  
 Dim rptdoc As CrystalDecisions.CrystalReports.Engine.ReportDocument  
 rptdoc = New CRWheatAll  
 rptdoc.Load("c:\itgctest\CRWheatAll.rpt")  '.rpt is there on targe pc  
 rptdoc.SetDataSource(dt)  
 'view report in crystalreportviewer  
 Form5.CrystalReportViewer1.ReportSource = rptdoc  
 Form5.ShowDialog()  
 Form5.Dispose()  
1
Had problem posting error message, here it is: ************** Exception Text ************** CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: The document has not been opened. at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.get_ReportAppServer() at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.get_ReportAppServer() at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()Larry
If you copy your entire BIN folder from your dev machine to the remote machine and run the .exe file, does it work then? If it does, that would eliminate some issues. I am thinking it could be an installer issue - there could be some files that may need to be copied over to the machine you are installing it on e.g. .DLLAleksandar Zoric

1 Answers

0
votes

You have to install Crystal Reports Runtime in the host machine.

For example: SAP Crystal Reports 13.0 runtime (64-bit)

Check you select the same version at your development environment.