Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRViewer error

Status
Not open for further replies.

LenaS

Technical User
Nov 28, 2000
98
US
I have a report which was created using CR4.6.1. I now have upgraded to CR8. I added this report to a VB project w/viewer enabled and got ‘Server has not yet been opened’ when I issued the show command. Now, I get an error on the code in italics below (Run-time error ‘450’: Wrong number of arguments or invalid property assignment). I put this code in based on a forum reply to server not open error, but I don’t really understand why. I just would like for this report to now use the data environment in this project. How do I do that please?

Private Sub Form_Load()
Screen.MousePointer = vbHourglass

Set Application = CreateObject("CrystalRuntime.Application")
Set Report=Application.OpenReport("k:\vb98\rpts\exhA.rpt")

For Each dbtable In Report.Database.Tables
dbtable.SetLogOnInfo
dbtable.LogOnServerName
dbtable.LogOnDatabaseName
Next

CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
 
What have you updgraded, the RPT file version or the version of the Crystal components/references used in the application or both?

Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
I don't understand the question. I installed CR8. I am no longer using the integrated CR4.6.1 that comes w/VB. The rpt was created using ver-4.6.1. At that point, it was not part of a project. It was added to the VB project via the CR8 step to include an existing report.
 
You may want to upgrade the report itself.
This simply means opening it in V8 and saving it, which should convert it to V8.

Can you run this report from the standalone design environment?

Can you get any report to run from the application? Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top