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

Crystal Report from VB6 What Am I missing Here?

Status
Not open for further replies.

CurtR

Programmer
Aug 9, 2000
66
US
I have backed what I am trying to do down to it's simplest form to try and get a Crystal Report to show.
We are running WIN NT4.0, VB6, I have only a single Crystal Control , a Single Text Box, and 1 Command Button on my form.
The code is simply this:

Private Sub Command1_Click()
Dim Start As String
Start = txtFromdate
CrystalReport1.ReportFileName = "G:\CITECT\Reports\Citect Oracle\Thickner_flows.rpt"
CrystalReport1.ParameterFields(0) = "START;" & Start & ";True"
CrystalReport1.Connect = "PWD = REPORTS"
CrystalReport1.PrintReport
End Sub

I Publish the project, place it on a network drive. If I run it from my machine it works great. If I go and log onto another machine. The Crystal Report flashes on the screen, but does not run.(the Crystal Control set to Print to Screen). I do not get any errors.
I included the Crystl32.ocx file when I published the project.
The machine that I tried this on has Crystal Reports Loaded, but unlike mine it does not have VB loaded.

Can anyone point me in a direction to start in?
Thanks
CurtR
 
Private Sub cmdPrint_Click()
If optAE = True Then
crAE.ReportFileName = App.Path & "\\csae.rpt"
crAE.ParameterFields(0) = "Start Date;" & txtSStart & ";true"
crAE.ParameterFields(1) = "End Date;" & txtSEnd & ";true"
crAE.Action = 1
Else
crSpot.ReportFileName = App.Path & "\\csspot.rpt"
crSpot.ParameterFields(0) = "Start Date;" & txtSStart & ";true"
crSpot.ParameterFields(1) = "End Date;" & txtSEnd & ";true"
crSpot.Action = 1
End If
End Sub

I use similar code to you and it works, I'm using pervasive.sql for my data, to run programs like this on other clients there are two things that need to be checked:

1) Does the other client have the db client? (I know, but I have to ask)
2) Database dependencies, for Oracle7 look for PDSORA7.DLL & ORA72WIN.DLL

I don't work with Oracle, so I may be completely wrong. But, I had similar issues awhile back, and the dependency files were the culprit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top