Note that there are some explanatory texts on larger screens.

plurals
  1. POusing Crystal Reports ReportDocument
    primarykey
    data
    text
    <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. 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>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload