JoannieJefferson
asked on
CRVIEWER "Physical Database not found."
I am using Visual Basic 6 and Crystal Reports 8
The app works fine on the developing computer(Win 2000),
but when I run setup on another computer (98,XP), I get (crviewer)
Physical Database not found.
I have installed all the required .dll's (read previous questions and got the answers)
I am using SQL 7.0 (database driver pdssql.dll) to connect to
database.
How can I get this to work? I need to know asap Job might depend on it :( !!
Section of code used:
--In modual
Public rptEnrollConfirmMaster As New Current_Enroll_Confirmatio n_Master_r pt
Public rptStatementDetail As New Statement_Detail
Public rptStatement As New Statement_rpt
Public crpParamDefs As CRAXDRT.ParameterFieldDefi nitions
Public crpParamDef As CRAXDRT.ParameterFieldDefi nition
Public crxParameterField As CRAXDRT.ParameterFieldDefi nition
Public crpSubreport As CRAXDRT.Report
------
strReportName = "Current_Enroll_Confirmati on_Master_ rpt"
dtStartDate = InputBox$("Enter start date", "Date Parameters")
dtEndDate = InputBox("Enter end date", "Date Parameters")
frmViewer.Visible = True
Screen.MousePointer = vbHourglass
rptEnrollConfirmMaster.Dis cardSavedD ata
Set rsParam = New ADODB.Recordset
rsParam.CursorLocation = adUseClient
Set crxParameterField = rptEnrollConfirmMaster.Par ameterFiel ds.Item(1)
crxParameterField.AddCurre ntValue strProgramID
Set crxParameterField = rptEnrollConfirmMaster.Par ameterFiel ds.Item(2)
crxParameterField.AddCurre ntValue dtStartDate
Set crxParameterField = rptEnrollConfirmMaster.Par ameterFiel ds.Item(3)
crxParameterField.AddCurre ntValue dtEndDate
Set crpSubreport = rptEnrollConfirmMaster.Ope nSubreport ("Enroll_C onfirmatio n_rpt")
Set crpParamDefs = crpSubreport.ParameterFiel ds
'It cycles through the ParameterFieldDefinitions collection for the subreport.
For Each crpParamDef In crpParamDefs 'Finds and sets the appropriate Crystal parameter for the subreport.
With crpParamDef
Select Case .ParameterFieldName
Case "@ProgramID"
.AddCurrentValue strProgramID
Case "@dtStartDate"
.AddCurrentValue dtStartDate
Case "@dtEndDate"
.AddCurrentValue dtEndDate
End Select
End With
Next
Set rsParam = conSQL.Execute("sp_qry_Cur rent_Enrol l_Confirm_ Master_Rep ort @ProgramID='" & strProgramID & "', @dtStartDate='" & dtStartDate & "',@dtEndDate='" & dtEndDate & "'")
rptEnrollConfirmMaster.Dat abase.SetD ataSource rsParam, , 1
With frmViewer
.Caption = strProgramName
.CRViewer.ReportSource = rptEnrollConfirmMaster
.CRViewer.DisplayTabs = False
.CRViewer.DisplayGroupTree = False
.CRViewer.EnableGroupTree = False
.CRViewer.ViewReport "ERRORS HERE"
.CRViewer.Zoom 95
End With
The app works fine on the developing computer(Win 2000),
but when I run setup on another computer (98,XP), I get (crviewer)
Physical Database not found.
I have installed all the required .dll's (read previous questions and got the answers)
I am using SQL 7.0 (database driver pdssql.dll) to connect to
database.
How can I get this to work? I need to know asap Job might depend on it :( !!
Section of code used:
--In modual
Public rptEnrollConfirmMaster As New Current_Enroll_Confirmatio
Public rptStatementDetail As New Statement_Detail
Public rptStatement As New Statement_rpt
Public crpParamDefs As CRAXDRT.ParameterFieldDefi
Public crpParamDef As CRAXDRT.ParameterFieldDefi
Public crxParameterField As CRAXDRT.ParameterFieldDefi
Public crpSubreport As CRAXDRT.Report
------
strReportName = "Current_Enroll_Confirmati
dtStartDate = InputBox$("Enter start date", "Date Parameters")
dtEndDate = InputBox("Enter end date", "Date Parameters")
frmViewer.Visible = True
Screen.MousePointer = vbHourglass
rptEnrollConfirmMaster.Dis
Set rsParam = New ADODB.Recordset
rsParam.CursorLocation = adUseClient
Set crxParameterField = rptEnrollConfirmMaster.Par
crxParameterField.AddCurre
Set crxParameterField = rptEnrollConfirmMaster.Par
crxParameterField.AddCurre
Set crxParameterField = rptEnrollConfirmMaster.Par
crxParameterField.AddCurre
Set crpSubreport = rptEnrollConfirmMaster.Ope
Set crpParamDefs = crpSubreport.ParameterFiel
'It cycles through the ParameterFieldDefinitions collection for the subreport.
For Each crpParamDef In crpParamDefs 'Finds and sets the appropriate Crystal parameter for the subreport.
With crpParamDef
Select Case .ParameterFieldName
Case "@ProgramID"
.AddCurrentValue strProgramID
Case "@dtStartDate"
.AddCurrentValue dtStartDate
Case "@dtEndDate"
.AddCurrentValue dtEndDate
End Select
End With
Next
Set rsParam = conSQL.Execute("sp_qry_Cur
rptEnrollConfirmMaster.Dat
With frmViewer
.Caption = strProgramName
.CRViewer.ReportSource = rptEnrollConfirmMaster
.CRViewer.DisplayTabs = False
.CRViewer.DisplayGroupTree
.CRViewer.EnableGroupTree = False
.CRViewer.ViewReport "ERRORS HERE"
.CRViewer.Zoom 95
End With
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad I could help.
-dave
-dave
ASKER
It turns out that the ACTIVE DATA DRIVERS were not installed on the other systems.
For the SubReports in the design view I just used the stored procedure database fields and passed the parameters values using the following code:
Set crpSubreport = rptEnrollConfirmMaster.Ope
Set crpParamDefs = crpSubreport.ParameterFiel
'--Cycles through the ParameterFieldDefinitions collection for the subreport.
For Each crpParamDef In crpParamDefs 'Finds and sets the appropriate Crystal parameter for the subreport.
With crpParamDef
Select Case .ParameterFieldName
Case "@ProgramID"
.AddCurrentValue strProgramID
Case "@dtStartDate"
.AddCurrentValue dtStartDate
Case "@dtEndDate"
.AddCurrentValue dtEndDate
End Select
End With
Next