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

Parameters to CrViewer from VB Error - Client machine

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Greetings and salutations.
I am using VB6 and CR8.0.0.393.
I have a simple snippet of VB code that calls a form containing a Crystal Reports Viewer control, which passes one parameter to the report. This runs fine on the development machine. I created an install with InstallShield Developer 7.0, to install on a client machine. The code does not work on the client machine. The form and viewer open correctly, but then I receive a "Physical Database Not Found" error from the viewer, and the handled error from VB is "Missing or out-of-date export DLL"

Now, here is the kicker: If I remove the lines of code that pass the parameter to the report, everything runs fine on the client machine!! What is it about passing parameters causes this to fail? Code here:

Code:
Private Sub Form_Load()
  Screen.MousePointer = vbHourglass
  Dim Report As Report
  Dim crxApplication As CRAXDRT.Application
  Dim strReportPath As String
  Dim dteMyDate As Date
  dteMyDate = "5/13/2002"
  Set crxApplication = New CRAXDRT.Application
  strReportPath = App.Path & "\EcatSupport\Data\rptTest.rpt"
  Set Report = crxApplication.OpenReport(strReportPath)
  Report.Database.SetDataSource (DataPath)

'When I comment out these two lines, everything works
'just fine on the client machine.  When I uncomment them
'I receive the errors I listed above.
  'Report.ParameterFields(1).ClearCurrentValueAndRange
  'Report.ParameterFields(1).AddCurrentValue dteMyDate

  CRViewer1.ReportSource = Report
  CRViewer1.ViewReport
  Screen.MousePointer = vbDefault
End Sub

Thank you very much for your time and the patience to help out a total stranger.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top