Solved

CRVIEWER "Physical Database not found."

Posted on 2004-10-13
3
859 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now