By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,969 Members | 2,422 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,969 IT Pros & Developers. It's quick & easy.

Crystal report viewer in VB 2005 Express

P: 7
I am trying to build an app that reads crystal reports. I was able to load the Crystal report viewer as a ActiveX plugin however I'm having problems.

Here's my code:

Public Class Form1

Private Sub AxCRViewer1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxCRViewer1.Enter
AxCRViewer1.ReportSource = "C:\Documents and Settings\krishnaswamy\Desktop\Crystal Test.rpt"
End Sub
End Class

All I'm trying to do is view the report. I have added the report viewer from the toolbox. I can see the crystal viewer layout in the form view but when compile I get an error message that says the following:

"INvalid Cast Exception by unhandled user code"

any comments??
Sep 5 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.