I seem to have a problem with Crystal Reports.

I am using VB.NET 2002 and also Crystal Reports v9.

I have put the viewer control on a form and on the load event of the form -

CRViewer.ReportSource = New report()

Where report() is my newly created crystal report file "report.rpt"

Once the form starts loading I get the following error.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: No such interface supported
at CRVIEWER9Lib.ICrystalReportViewer9.set_ReportSource(Object pVal)
at AxCRVIEWER9Lib.AxCRViewer9.set_ReportSource(Object value)
at NDBS.frmReportViewer.frmReportViewer_Load(Object sender, EventArgs e) in E:\Visual Studio Projects\VB .NET\Netcoms.co.uk\NDBS\frmReportViewer.vb:line 65
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Control.Show()

Weird!!!!

Any suggestions???

Regards,


Matt.