VB/Crystal Reports/MS Word/OLE problem 
Author Message
 VB/Crystal Reports/MS Word/OLE problem

Hi All,

I'm writing an application in VB using the crystal32 OCX to print
some reports. I've successfully used Crystal Reports in VB
applications
before, but this time I'm running into a few problems. I'm including
an MS Word document on my report (using Insert -> OLE Object) and then
overlaying some database fields (from an Access database) over the
top.

This all seems to work fine when I do a preview from the Crystal
Reports designer or when running the application on my development
machine. However I was a little concerned that my application would
ONLY print reports properly on a machine that had MS Word installed
on it (due to the OLE link in the report). So I got a machine that
had only just had Win95 installed on it (no MS Word) and ran my
application setup on this new machine.

The setup files were created using the Visual Basic Application Setup
Wizard and had successfully worked on several other development
machines.

Unfortunately, whenever my application tries to print a report on this
new machine, I get an error from the crystal reports control saying
"Can not initialize OLE". I don't know whether this has anything to do
with the fact that Word is not installed on this machine... I suspect
that this is not an issue as I've tried printing the same report with
the MS Word object deleted from it, and have gotten the same message.
The only thing I can think of is that maybe all the necessary OLE DLLs
have not been installed by the setup program, but then again these
should all be automatically included by the VB Setup Wizard!

Do you have ANY idea what might be causing this problem? Any help
would be greatly appreciated. Maybe someone even has a list of the
DLLs
needed by the crystal reports OCX...


Thanks in advance,

Martin.



Wed, 30 Aug 2000 03:00:00 GMT  
 VB/Crystal Reports/MS Word/OLE problem

To use OLE with Word, Word has to be installed on every machine that your
application is going to run on.

Quote:

>Hi All,

>I'm writing an application in VB using the crystal32 OCX to print
>some reports. I've successfully used Crystal Reports in VB
>applications
>before, but this time I'm running into a few problems. I'm including
>an MS Word document on my report (using Insert -> OLE Object) and then
>overlaying some database fields (from an Access database) over the
>top.

>This all seems to work fine when I do a preview from the Crystal
>Reports designer or when running the application on my development
>machine. However I was a little concerned that my application would
>ONLY print reports properly on a machine that had MS Word installed
>on it (due to the OLE link in the report). So I got a machine that
>had only just had Win95 installed on it (no MS Word) and ran my
>application setup on this new machine.



Wed, 30 Aug 2000 03:00:00 GMT  
 VB/Crystal Reports/MS Word/OLE problem

  I have no magic bullet, but a few suggestions:

  1)  Because of the  error message you're getting it seems that Crystal
Reports cannot reference the OLE library for Word.  The file for Office
97 is MSWORD8.OLB.  This  file needs to be included in your setup,
and/or installed on the production machine.

  2)  If the Word library exists and is registered on the production
machine, you  can get the distribution file list for Crystal Reports
from the help.  Again, make sure the files are included in the setup.

  Crystal Reports is a buggy piece of software (in my opinion) and just
because you removed the Word OLE object doesn't mean it doesn't try to
load it.  If this is the only OLE reference in your .rpt file I'd look
to this first.  You might try creating a new report with everything but
the Word object and see if it runs to narrow it down.
  VB setup wizard often fails to include necessary files from third
party vendors, which is why you should always check the file list from
the manufacturer and manually check the dependency list for missing
ones.

  Hope this helps.

  Regards,  Pat



Fri, 01 Sep 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB/Crystal Reports/MS Word/OLE problem

2. VB OLE to MS Word - code.txt [01/01]

3. VB OLE MS Word - code.txt [01/01]

4. OLE Automation between VB and MS Word

5. Help: Crystal Report 6.0 OLE / DAO problem

6. Problem with Crystal Reports and Excel OLE-object stored in SQL Server 6.5 and vertical text

7. Informix OLE DB in Crystal Report Problem

8. Crystal Reports 6 OLE Server problems...

9. Exporting a report to MS Word 97 problem, Please Help

10. Crystal report + MS SQL Server problem

11. Exporting from VB Crystal to MS Word

12. Version Problem w/ crystal report and ms sql

 

 
Powered by phpBB® Forum Software