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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cr9 Connect /ConnectionInfo issue

Status
Not open for further replies.

RobHVB6Sql

Programmer
May 20, 2002
77
0
0
AU
I'm using VB6 /SQL6.5 and CR9.
Sorry I looked through heaps of posts and cant solve this one.

Code:
Dim ConnectionInfo As CRAXDRT.ConnectionProperties

Set ConnectionInfo = Report.Database.Tables

I recieve and error message saying the 'report' variable is not defined.
When I define it eg
Code:
Dim ConnectionInfo As CRAXDRT.ConnectionProperties
Dim Report As New CRAXDRT.Report 'attempt added by RH

Set ConnectionInfo = Report.Database.Tables(1).ConnectionProperties
I get "Method 'Database' of object 'IReport' failed".

I have CR10 installed on the machine, but am using crxdrt.dll from version 9.
(Attempting to get cr10 reports showing through crviewer9.dll, as have some Windows 98 machines still).



Rob Hasard
(VB6 /SQL 7.0 /CR8.5)
 
Where is your Report object created? Are the reports embedded within the application, or are you opening the reports from outside the application (from a folder)?

-dave
 
The reports are located on a network drive.

I now have it working using the method below.
I'll probably stick with this method, sorry need to get this going quickly.

PS I do remember changing the Reference /Components and rebooting VB, maybe this was the issue.
I'm now using crviewer9.dll (CR9) and the Active X Designer craxdrt.dll from CR10.

Code:
'set the variables
Set crpApplication = CreateObject("CrystalRuntime.Application")
'Open the report
Set pcrpReport = crpApplication.OpenReport(strReportPath)

Set crpApplication = Nothing




Rob Hasard
(VB6 /SQL 7.0 /CR8.5)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top