简体   繁体   中英

Visual Studio 2005 Creating Setup.exe with Crystal Report 9 and ODBC driver

My project is running fine. Now I want to create a setup.exe and give it for deployment.

Last time I sent it it was fine but for the last few attempts and I am now giving up I have the following problem:

  1. After I install the setup.exe thus created even on the machine on which the project was running under debugger the project runs file unless I try to print a report under Crystal Report. The error given is 'Failure to load database information. Unable to load Crbd_odbc.dll'. I may mention that my database connection to access is through ODBC.

I now re-install Crystal Report. The problem gets solved.

My Hunch: For some reason the reference to the system DLLCrbd_odbc.dll is being lost and is being restored while reloading Crystal report.

I do not know how to give a proper Setup.exe for deployment.

Regards,

Harvinder S Jabbal

When you create a setup deployment package in Visual Studio for an application that uses Crystal Reports (the Crystal Reports Viewer Control) then you need to be sure you also add the references to the Crystal Runtime components.

You can do this in 2 ways.

  1. You include the Crystal Reports Merge module for the version you are using within your Setup. (this is not recommended because your setup size will be huge because of crystal reports only)

  2. You do not include any references to the Crystal Reports components, however, in the requirements of your software you need to specify that the client needs to install the correct Crystal Reports Runtime (this is recommended)

You can download both, the merge module and/or the crystal runtime, from the SAP/Crystal Reports web site.

NOTE: Crystal Reports contains 2 set of components, those managed (the ones you reference on your .NET app) and those native (the ones that really do the low level stuff such as DLLCrbd_odbc.dll) if you manually include the referenced assemblies used by your .NET project into your setup.exe it won't work because those managed dlls are looking for the native ones which are installed by Crystal Reports Full version of the Runtime/MergeModule. Maybe that's why you don't have that.dll

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM