ASP Integration

Printed From: Crystal Reports Book — Forum Name: Talk with the Author

I bought your book and am a little confused about the integration of a report in a web form. 
 
The book says Dim MyReport as New CrystalReport1() -- page328.
My intellisense does not bring CrystalReport1 at all.  Instead it brings "Report".  Is CrystalReport1 the actual name of the report or i sit replaced in the newer VS2005?
 
I am currently using Crystal XI and VS2005.  Also, the reports I am using are stand alone reports created in Crystal XI and not part of VB.NET.
 
SunDevil
 
With ASP.NET 2005 they removed the ability to instantiate reports as objects. Thus, intellisense won't work with ASP.NET (although this is still valid for Windows applications). Instead you have to instantiate a ReportDocument object and use the Load() method to load a report into memory.
Dim myReport as New ReportDocument()
myReport.Load("C:\sample.rpt")
myCrystalReportViewer.ReportSource = myReport
Thanks... That's just what I trie and eventually got it working.  I even posted this on the forum.  But thanks for the response. 
 
Would you be working on the VS2005 version?  You should - because there are hardly any books on Crystal programming and you seem to have a nice way to explain as compared to other books I have read.  Hope to find more of your work. 
 
Sun Devil