John
John

Reputation: 16007

Problem adding Crystal Report to VS 2005 project

I'm trying to add a Crystal Report to a VS 2005 VB project.

Here's what I do:

I get this error:

'Site' is not a member of 'MyProject.CachedCrystalReport1'
     C:\BasProj\MyProject\MyProject\CrystalReport2.vb

The method in the generated code:

    Public Overridable Function CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocument Implements CrystalDecisions.ReportSource.ICachedReport.CreateReport
    Dim rpt As CrystalReport1 = New CrystalReport1
    rpt.Site = Me.Site
    Return rpt
End Function

I guess somehow I told it that I want to make a website or something, but I don't know how.

I started up a fresh solution (Visual Basic Windows Application) and added a Crystal Report without any problems.

Any hints how to fix this?

UPDATE: OK, something's really screwed up. When I inspect the Me object above, it isn't even putting out the kind of object I expect. I think I may need to piece together the solution again.

Upvotes: 2

Views: 575

Answers (1)

John
John

Reputation: 16007

Found the problem: name clash.

I was trying to move objects into the main application's project, and got rid of a subproject in the process. When I did this, one of the classes conflicted. That's why the Me object was all screwed up.

Upvotes: 2

Related Questions