Crystal Viewer Does not accept ReportDocument as source 
Author Message
 Crystal Viewer Does not accept ReportDocument as source

Hi,

I have a VB.Net form that has the Crystal Viewer control on it.  This
control will accept an .rpt file as the ReportSource, but generates and
invalid Report Source error when I pass a ReportDocument. In code:

RptViewer.reportsource ="C:\myreport.rpt"

works fine.  But,

dim mDoc as new CrystalDecsitions.CrystalReports.Engine.ReportDocument()

mDoc.Load("C:\myreport.rpt")
RptView.ReportSource = mDoc

generates an error.  Does anyone know why?

Thanks,

Jerry



Sat, 14 May 2005 06:29:57 GMT  
 Crystal Viewer Does not accept ReportDocument as source
 I fixed this!

The problem is that the version of the viewer that ships with MS Visual
studio .NET is based on 9.1. This works fine as long as you don't decide
that Crystal is worth having and buy the upgrade to Crystal 9. This upgrades
the DLLs to version 9.2 which are incompatible with 9.1. As a result, you
end up with you .net project referencing version 9.1 of the viewer and
trying to pass it the version 9.2 ReportDocument object. This version of the
object is not compatible and generates the error.

The fix is to open your project in VS.net. Go to the Project references.
Locate the viewer and see what version it shows in the Property dialog. If
it is 9.1, delete this reference. The re-add the reference to the project.
This time it will be version 9.2 and everything works.

j

Quote:
> Hi,

> I have a VB.Net form that has the Crystal Viewer control on it.  This
> control will accept an .rpt file as the ReportSource, but generates and
> invalid Report Source error when I pass a ReportDocument. In code:

> RptViewer.reportsource ="C:\myreport.rpt"

> works fine.  But,

> dim mDoc as new CrystalDecsitions.CrystalReports.Engine.ReportDocument()

> mDoc.Load("C:\myreport.rpt")
> RptView.ReportSource = mDoc

> generates an error.  Does anyone know why?

> Thanks,

> Jerry



Sun, 15 May 2005 01:57:08 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Memory usage with ReportDocument and windows viewer

2. Crystal Smart Viewer doing odd things

3. Invalid Report Source Error in Crystal Report Viewer

4. How to pass NET dataset to Crystal using ReportDocument Class

5. Crystal Report Viewer .NET not releasing memory!?

6. Crystal 8, ActiveX Viewer not refreshing reports

7. Passing Parameters from C# to Crystal Report / Crystal Report Viewer

8. Crystal 9 and the Crystal report viewer OCX.

9. dbVersion20 does not accept dbText?

10. CreateTableDef Does Not Accept vbAttachedTable as Parameter

11. Number Keypad Values Not accepted as Numieric

12. NDR from Exchange some servers not accept

 

 
Powered by phpBB® Forum Software