I recently started using the latest version of Crystal Reports with Visual Studio 2010 and SharpDevelop in a Windows application with forms (forms). I downloaded the latest Crystal DLLs for Visual Studio 2010 from SAP and manually created the links to the following
using CrystalDecisions.CrystalReports; using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.ReportSource;
Then I create a ReportDocument to open the rpt file:
ReportDocument rptDoc = new ReportDocument();
it all compiles fine. The problem occurs when I try to use the rtpDoc object for something;
rptDoc.Load(@"c:\DialLeadsByDistributor.rpt");
it is as if the compiler did not understand it as an object of a class, despite the fact that when you mouse over a variable, it correctly describes it as CrystalDecisions.CrystalReports.Engine.ReportDocument , but not only intellisense does not show me any methods or properties of the object, I get the following compiler error, which puzzled me:
Invalid token '(' in a member declaration of a class, structure, or interface
which refers to the above statement as a violation string ...
Can anyone shed some light on this? If I look at the metadata for the ReportDocument class, it contains three Load methods, the first of which takes a string that represents the path to the rpt file. The fact that this problem occurs both in Visual Studio 2010 and in SharpDevelop is at least consistent, but it still makes no sense to me.
source share