using ReportDocument (Crystal Reports for VS 2010) c#
<p>I recently started using the latest version of Crystal Reports with both Visual Studio 2010 and SharpDevelop in a c# windows application (forms). I've downloaded the latest Crystal DLLs for Visual Studio 2010 from SAP and manually created references to the following </p>

<pre><code>using CrystalDecisions.CrystalReports;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportSource;
</code></pre>

<p>I then create a ReportDocument so that I can open a rpt file:</p>

<pre><code>ReportDocument rptDoc = new ReportDocument();
</code></pre>

<p>this all compiles fine. The problem arises when I try to use the rtpDoc object to do anything; </p>

<pre><code>rptDoc.Load(@"c:\DialLeadsByDistributor.rpt");
</code></pre>

<p>it's as if the compiler doesn't realize it's a class object, despite the fact that when I mouse over the variable it reports it properly as a <code>CrystalDecisions.CrystalReports.Engine.ReportDocument</code>, but not only does intellisense not show me any methods or properties of the object, I get the following compiler error which has me stumped:</p>

<blockquote>
  <p>Invalid token '(' in class, struct, or interface member declaration   </p>
</blockquote>

<p>which references the above statement as the offending line...</p>

<p>Can anyone shed any light on this? If I look at the metadata for the ReportDocument class is does contain three Load methods, the first of which takes a string which is the rpt file path. Any help is most appreciated. The fact that this problem occurs in both Visual Studio 2010 and SharpDevelop is at least consistent, but still makes no sense to me.</p>

<p>Thanks for any advice,</p>

<p>Gary</p>
