Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5490649
  • 博文数量: 890
  • 博客积分: 12876
  • 博客等级: 上将
  • 技术积分: 10760
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-04 14:18
个人简介

猝然临之而不惊,无故加之而不怒。

文章分类

全部博文(890)

文章存档

2016年(1)

2014年(18)

2013年(41)

2012年(48)

2011年(65)

2010年(84)

2009年(121)

2008年(101)

2007年(129)

2006年(95)

2005年(118)

2004年(69)

分类:

2005-11-08 10:10:35

使用VB6+Crystal时出现的错误解决方法:

Err Msg: "Physical Database not found" if using Active Data driver (p2smon.dll)

The information in the article refers to:
Crystal Reports, Report Designer Component 8

Applies to: SynopsisA report was created using the Crystal Active Data driver (P2smon.dll). When the report was run through an application using one of the Crystal Report Development tools on a client computer, the following error occurs:

"Physical database not found"

Note=========
Crystal Reports development tools include:

-Crystal Report Designer Component Automation server (Craxdrt.dll)
-Crystal Report Engine Automation server (Cpeaut32.dll)
-Crystal Report Print Engine Calls (Crpe32.dll)
-Crystal ActiveX Control (Crystl32.ocx)
-Crystal Visual Component Library (VCL)
=============

Reported version only
Active Data Driver P2smon.dll
Error: "Physical Database not Found"

Solution

To troubleshoot the error message, try one of the following procedures:

• Ensure that 'p2smon.dll' is in the System32 directory.

• Ensure the following runtime files are installed on the computer:

Msvcrt.dll
Msvcirt.dll
Msvcp60.dll

• Ensure all dependency files for P2smon.dll are on the computer by running the Dependency Walker utility (Depends.exe). Dependency Walker is a free Microsoft utility that scans any 32-bit or 64-bit Windows module, such as *.exe, *.dll, *.ocx, *.sys, etc, and builds a hierarchical tree diagram of all dependent modules.

For further information about Depends.exe, refer to Knowledge Base article c2007141. Search for this Knowledge Base article at
.

• Ensure that no other copies of P2smon.dll are being loaded. For example, an older copy of P2smon.dll renamed with any suffix (like P2smon.dll_old) may load and cause errors to appear.

• Ensure the database is not being verified at runtime or at design time.

a) To confirm the database is not being verified at runtime:

Comment out the code that is verifying the database. For example, if you are using the Report Designer Component, you would comment out:

Report.Database.Verify

b) To confirm the database is not being verified at design time:

- Open the report in the Crystal Report Designer.
- On the 'Database' menu, 'Verify on Every Print' should not be checked.

Note: ==========

If you created your report using the Report Designer Component (RDC) in Microsoft Visual Basic (VB), it is an ActiveX Designer report file (DSR). You need to save the DSR file as a Crystal Report file (RPT) so you can confirm if 'Verify On Every Print' is disabled. You can then import that RPT file back into the application.

==============

To save a DSR file as an RPT file:

1. With VB running, open the DSR file.
2. Right-click in an empty area of the DSR file, click 'Report' and then click 'Save to Crystal Reports file'.
3. The 'Save As' dialog box appears. Browse to the folder you want to save the RPT file in, type the name for the RPT file in the 'File Name' box and click 'Save'.
4. The message 'The Crystal Report Designer's event code will not be saved in the report file!' appears.
This message refers to any code in the code window of the DSR file. If the RPT file is imported back into the application, the code can be copied into the new DSR file from the original DSR file.


To import a RPT file into VB:

1. With VB running, click 'Project'.
2. From the Project menu do one of the following:
click 'Crystal Report 8'
- or -
click 'More ActiveX Designers' and then click 'Crystal Report 8'
3. The 'Seagate Crystal Report Gallery' dialog box appears. Click 'From an Existing Report' and then click 'OK'.
4. The 'Open' Dialog box appears. Browse to and select the RPT file to import.

==========
LOCALIZED ERROR MESSAGE TRANSLATION

The French and German translations of this error message are available and listed below.

French: Base de données physique introuvable

German: Physische Datenbank nicht gefunden

Find search tips for localized error messages at the following link:



==========


Category:
Subject:
Topic:
Keywords:

Development
Report Designer Component (RDC)
Distribution/Runtime
SCRCOM, ACTIVE DATA, P2SMON.DLL, ERROR, PHYSICAL, PHYSICAL DATABASE NOT FOUND,


Status:

Verified

Product:

Crystal Reports Developer

Reported Version:

8.0.0.371 Crystal Reports Developer

Applies to:

Reported version only

Bit Version:

32 Bit

Reported OS and Version:

Windows 98

Applies To (OS Versions):

Not tested with other platforms

 

I use allways a verify dataset.

Step 1. Create a DataSet and write it to the harddisc with
dataset.writeXMLSchema
                                          (Run the Programm! After all
delete this code!)
Step 2. load this schema to your project
Step 3. click the schema use the menu Schema and the point DataSet generate
(Verify dataset!)
Step 4. create an empty Crystal Report
Step 5. by the selection from the Database, you must use projectdata->
Ado.net DataSets->

the verfiyed DataSet are listet
Step 6. You must define the Output from the Report
Step 7. At runtime: Fill the dataset with the real data and call a procedure
like that:
Private Sub report()
Dim crReportDocument As crTest  ' the CrystalReport
crReportDocument = New crTest

'***** Datasource setting !!! ***********
crReportDocument.SetDataSource(myDataSet)
With CrystalReportViewer1
  .ReportSource = crReportDocument
   .ShowFirstPage()
End With
End Sub

PS: i have only the german Version of Visual Studio. I hope you understand
me (bad english)  and the menuitem are easy to translate(Schema and so on).

阅读(3329) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~