Results 1 to 5 of 5

Thread: physical database not found (crystal)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2003
    Posts
    27

    physical database not found (crystal)

    hi friends,
    I am developing on project in VB6/Access.
    While running one report in crystal 8.5, I am having error 'physical database not found'.

    In crystal help it is said that
    ---
    The program is unable to locate either a DLL or the database. Check to make certain that the directories that hold these files are listed in the path statement.
    ---
    but I have checked my database file. Even checked set location, it is ok. Is there any way I can get the name of the dll file missing. Is it possible with on error. How to use it. Or any other better solution.

    Pls note that I am getting this error only after running my EXE file on any other machine & not mine.

    Thanks in advance

  2. #2
    Member
    Join Date
    Jan 2002
    Location
    Somewhere in war torn Israel
    Posts
    51
    first of all make sure that ALL the fields used to design the report exist in the recordset passed at run time.

    second make sure that P2smon.dll is in your System folder and is registered (use 'regsvr32 P2smon.dll' in the Start->Run prompt)

  3. #3
    Hyperactive Member VB4fun's Avatar
    Join Date
    May 2003
    Location
    too far from Fiji
    Posts
    342
    not sure what you are using to do the install...
    but this might be of service to you...

    http://www.vbforums.com/showthread.p...44#post1487744

    make sure and check the runtime file, to make sure you have all of the required dll's for your reporting purposes....

    Talk does not cook rice.
    -Chinese Proverb

  4. #4
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Dublin (Ireland)
    Posts
    304
    No I think the answer is much more likely to be that when you created the report using the designer, and took the add database, it imbeds the values for the datasource from your own machine.
    In your application, specifically set the datasource for the report
    I have a general report viewer wher I pass the name of the report and the name of the dataset and my code looks something like this:
    Public Sub loadme(ByVal RptName As String, ByVal DsNam As String)
    Dim Rpt1 As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
    Dim DbNam As String
    Dim SqlStr As String = "Select * from " & DsNam
    DbNam = DbConn.CurrCon
    Dim Cn1 As New OleDb.OleDbConnection(DbNam)
    Dim da1 As New OleDb.OleDbDataAdapter()
    da1.SelectCommand = New OleDb.OleDbCommand(sqlstr, cn1)
    Dim ds1 As New DataSet()
    ' Connect to the data source, fetch the data, and disconnect
    ds1.Clear()
    da1.Fill(ds1, DsNam)
    ' Pass the populated data set to the report.
    Rpt1.SetDataSource(ds1)

    hope that helps

  5. #5
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Dublin (Ireland)
    Posts
    304
    and I shouild have added this:

    Public Class DbConn

    Public Shared CurrCon As String = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=lams;Data Source=localhost;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=CLASSIC;Use Encryption for Data=False;Tag with column collation when possible=False"

    End Class

    this is a shared ember to hold my connection string. Note the use of "localhost", which makes the connection non-machine specific.

    I would guess that when you desigend the reports adding in your database, you entered the name of sql server and that is what it is using in the reports you are distributing.

    On the other hand of course, I could be completely wrong and it is a setup problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width