Solved

CRVIEWER "Physical Database not found."

Posted on 2004-10-13
3
867 Views
Last Modified: 2012-08-14
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
0
Comment
Question by:JoannieJefferson
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
vidru earned 500 total points
ID: 12300389
If you designed the report using pdssql.dll, and you're trying to pass a recordset to the report at runtime (which would be using pdsmon.dll or p2smon.dll), there could be a conflict between the two connectivity types, or the active data driver might not exist on the offending workstations.

I see that you're setting the main report's data by sending a recordset, but how is the subreport getting its data?

There are several whitepapers on this at the BO website.  Here are a couple:
http://support.businessobjects.com/library/kbase/articles/c2007727.asp
http://support.businessobjects.com/library/kbase/articles/c2009409.asp

-dave
0
 

Author Comment

by:JoannieJefferson
ID: 12301275
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

0
 
LVL 13

Expert Comment

by:vidru
ID: 12410496
Glad I could help.

-dave
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question