Print Page | Close Window

ASP Integration

Printed From: Crystal Reports Book
Category: General Information
Forum Name: Talk with the Author
Forum Discription: Ask Brian questions about his books and give him your comments. Like the book? Hate the book? Have suggestions? Let me know!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1761
Printed Date: 27 Apr 2024 at 7:55pm


Topic: ASP Integration
Posted By: SunDevilPrgmr
Subject: ASP Integration
Date Posted: 26 Nov 2007 at 9:13pm
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
 



Replies:
Posted By: BrianBischof
Date Posted: 26 Nov 2007 at 10:33pm
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


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: SunDevilPrgmr
Date Posted: 28 Nov 2007 at 8:59pm
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
 



Print Page | Close Window