Link to home
Start Free TrialLog in
Avatar of JoannieJefferson
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_Confirmation_Master_rpt
Public rptStatementDetail As New Statement_Detail
Public rptStatement As New Statement_rpt
Public crpParamDefs As CRAXDRT.ParameterFieldDefinitions
Public crpParamDef As CRAXDRT.ParameterFieldDefinition
Public crxParameterField As CRAXDRT.ParameterFieldDefinition
Public crpSubreport As CRAXDRT.Report
------

    strReportName = "Current_Enroll_Confirmation_Master_rpt"
    dtStartDate = InputBox$("Enter start date", "Date Parameters")
    dtEndDate = InputBox("Enter end date", "Date Parameters")
    frmViewer.Visible = True
    Screen.MousePointer = vbHourglass
    rptEnrollConfirmMaster.DiscardSavedData
       
    Set rsParam = New ADODB.Recordset
    rsParam.CursorLocation = adUseClient
   
    Set crxParameterField = rptEnrollConfirmMaster.ParameterFields.Item(1)
    crxParameterField.AddCurrentValue strProgramID
    Set crxParameterField = rptEnrollConfirmMaster.ParameterFields.Item(2)
    crxParameterField.AddCurrentValue dtStartDate
    Set crxParameterField = rptEnrollConfirmMaster.ParameterFields.Item(3)
    crxParameterField.AddCurrentValue dtEndDate
   
    Set crpSubreport = rptEnrollConfirmMaster.OpenSubreport("Enroll_Confirmation_rpt")
    Set crpParamDefs = crpSubreport.ParameterFields
                                                        '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_Current_Enroll_Confirm_Master_Report @ProgramID='" & strProgramID & "',  @dtStartDate='" & dtStartDate & "',@dtEndDate='" & dtEndDate & "'")
    rptEnrollConfirmMaster.Database.SetDataSource 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
ASKER CERTIFIED SOLUTION
Avatar of vidru
vidru

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JoannieJefferson
JoannieJefferson

ASKER

Thank soooo much Dave!

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.OpenSubreport("Enroll_Confirmation_rpt")
 Set crpParamDefs = crpSubreport.ParameterFields

'--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

Glad I could help.

-dave