Hi, After I packaged the project and deployed it on another computer without VB6 installed on it, Every thing works properly except the Reports. when I try to call the Report it gives error "Application-defined or Object defined error" and Report does not open. If you install VB6 this problem does not come. Please help me

What kind of reporting tool are you using? Is it a third party control like Crystal Reports or is it VB6 Report control?

I am using VB6 Report controll

When you do the app compilation, is the reporting controls included?

It seems that they are missing from the installation (compilation) cab file.

Reporting controlls seems to be included. Because when I install VB6 the Reports are visible and without VB6 installed on computer the compiled programme doesn't work properly. It gives errors when you try to open reports

What kind of errors do you get? Maybe it is not the reports. As far as I know, the reports must be packaged with the cab file when compiling, the same with any other controls that does not form part of VB6.

I'll test something on my side with reports as soon as time allows. I'll let you know where I found the problem to be.

What Operating system are you installing on? Win XP, Vista or Win 7?

@daniwaber are you using dataenvironment? maybe its the connection. I encounter it sometimes. You have to relocate your database path and reset it.

I am using WinXP. The reports are getting packaged at compilation. When you install this programme(packaged) on a PC with VB6 installed on it, the package works. Reports also work properly. but on a PC where VB6 is never installed on it, Reports are not visible and it gives error. The error does not come even if you uninstall VB6 from the PC. This means some dll files which are necessary for Reports to be visible are not there. When you install and uninstall the VB6 these files remain on PC and Reports work. Please Let me know

Here is your solution with some add ons....

Microsoft has confirmed that this is a bug in the Microsoft products that are listed.

Visual Basic installs two files, Msdbrpt.dll and MSdbrptr.dll, that are very similar. Both files are listed in the References dialog box as Microsoft Data Report Designer v6.0. The Msdbrpt.dll file is the Data Report designer, and the Msdbrptr.dll file is the Data Report designer runtime. You must distribute the run-time version of this file with your application. There is no dependency file for Msdbrpt.dll. If Msdbrpt.dll is installed with your application, a data report does not function correctly.

There are several ways in which to add a data report to a Visual Basic project. With two known exceptions, Visual Basic adds the correct reference. If you add this reference manually, the similarity between these two files makes it easy to reference the wrong file. The other way to get an incorrect reference is to add the data report component through the Add Components dialog box. This adds a reference to the data report instead of the data report runtime file. Under these circumstances, the data report works only in the development environment or when the data report is installed to a computer that has Visual Basic installed.

Symptom - You are distributing a Visual Basic application that includes a data report. After installation, you receive the following error when you attempt to open the data report from your application:
Run-time error '713': Application-defined or object defined error

Cause - The Data Report run-time file (Msdbrptr.dll) was not included in your setup package.

To resolve this problem, use one of the following methods:
Open your project, and include a reference to the Msdbrptr.dll file. This file is listed as Microsoft Data Report Designer v6.0 in the References dialog box. You may see Microsoft Data Report Designer v6.0 listed more than once. Make certain that the file associated with the reference is Msdbrptr.dll. Once the reference has been verified, rebuild your setup package.

-or-
Manually include the Msdbrptr.dll file in the Package and Deployment Wizard (PDW). You can add the file manually in the Included Files dialog box window when you run the PDW and then rebuild your setup package.
After the installation, the following files should be present on the target system in the indicated folders:
<windows system>\Msdbrptr.dll
<program files>\Common Files\Designers\Msderun.dll
<windows system>\Msstdfmt.dll
The inclusion of Msdbrptr.dll (and its dependent files) typically corrects this problem. If you are still experiencing problems, make sure that the following files are included in your package:
Msdatrep.ocx
Msbind.dll
Data Reports do not directly depend on these files. However, if the files are missing, this can affect the Data Environment that is used by your report.

NOTE: If your application must have the Msdatsrc.tlb file, do not explicitly include this file because Msdatsrc.tlb is installed as part of the Microsoft Data Access Components (MDAC) upgrade.

If you have a look at the above, it does not seem that you have service pack 6 upgrade on your VB6 package. Once you have installed vb6 on the user pc, it all works fine because the proper dll is now installed. THIS IS WHY I HAVE ASKED THE QUESTION, IS THE PROPER DLL INCLUDED IN YOUR PACKAGE. With the above, you will ensure that it is and the reports will run fine WITHOUT installing vb6.:)

Hi Andreret, you are great. You have solved my problem. I am using VB6 sp6, still I encountered the problem. But as per your directions the problem is solved. Thanks

It took as a while, but it was a huge pleasure. VB6 apps does not play nice at compilation...;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.