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

Crystal Reports 9 and VB6

Status
Not open for further replies.

FreshBe

IS-IT--Management
Jul 25, 2006
9
0
0
GB
Hello there, I need some help on the following please.

I am using Excel97 VBA to open and print a pre-made crystal report saved on the HD, got this bit to work OK. The problem is I can't figure out how to connect to the oracle database so that I can pass parameters to the stored report to change the values on the printed report. I have tried the following code but although it does not display an error it just prints blank reports.

Dim app As New CRAXDRT.Application
Dim rpt As CRAXDRT.Report

Set rpt = app.OpenReport( App.path & "\2006.rpt")
rpt.ParameterFields(1).AddCurrentValue 1015283
rpt.Database.LogOnServer "crdb_oracle.dll", "Oracle SID", "", "username", "password"
rpt.PrintOut False, 1
 
This doesn't appear to involve VB6 at all. I might suggest that you post in the Excel VBA forum.

HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top