|
-
Jul 21st, 2003, 01:26 PM
#1
Thread Starter
Junior Member
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
-
Jul 22nd, 2003, 12:15 AM
#2
Member
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)
-
Jul 22nd, 2003, 06:00 AM
#3
Hyperactive Member
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
-
Jul 23rd, 2003, 12:47 AM
#4
Hyperactive Member
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
-
Jul 23rd, 2003, 02:32 AM
#5
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|