Search code examples
c#winformscrystal-reports

System.MissingMethodException Method Not Found Crystal Reports


I'm running into the following exception on my client workstation when trying to update the application:

System.MissingMethodException: 
Method not found: 'Void CrystalDecisions.Windows.Forms.CrystalReportViewer.set_CachedPageNumberPerDoc(Int32)'.
at OpusRw.CrystalReports.CryRepView.InitializeComponent()
at OpusRw.CrystalReports.CryRepView..ctor() in   
   c:\cli_code\OPUSfin\OPUSfin\CrystalReports\CryRepView.cs:line 21
   at OPUSfin.SubForms.PrintScreen.btInsertion_Click(Object sender, EventArgs e) in  
   c:\cli_code\OPUSfin\OPUSfin\SubForms\PrintScreen.cs:line 55

However when I debug the code locally I have no problem. (The updates did not even alter the code in question).

I initially assumed this was a .dll error and Have tried cleaning the solution, removing and re-adding the .dll's to no avail.

What other things can I try to resolve the issue ?


Solution

  • I program in vb and had a similar issue. Have a vb.net app with many screens/forms each with a CrystalReportViewr (crv). Screens developed prior to 7/2014 work fine. Those developed after wouldn't load and got the error: 'Void CrystalDecisions.Windows.Forms.CrystalReportViewer.set_CachedPageNumberPerDoc(Int32)'. Solution: Open 'SolutionExplorer'. Go to form in question and expand the '+' sign. Right click on YourFormName.Designer.vb and choose 'View Code'. In resultant code window scroll to find the name of the CrystalReportViewer. Comment out line: "Me.crv1.CachedPageNumberPerDoc = 10".

    I recompiled and updated the app on user's machines and it worked.