export to MS Word .doc, copy and paste formatting problem

I have a C# Windows application (MS DevStudio 2003) linked to an MS Access 2002 database.  I export data to a Microsoft Word document (.doc) successfully.  However, when I copy and paste that report to another Microsoft Word document, some of the formatting is lost and some fields and divider lines from the Crystal Report generated MS Word document incorrectly underlay when pasted to the new MS Word document.

I have updated using the weekly hot fix, although I did read something in this article: http://support.businessobjects.com/library/kbase/articles/c2013041.asp
This article stated I need to be using Crystal Reports version 9.2.2.x.  My CR is bundled and I do not see a version number anywhere in the MS DevStudio about box.  I am wondering whether you could point me in the right direction.

I am not certain whether I have a programming error or a CR design error or something else.  Perhaps the question is easy for you, but it has been a sore spot for me.

Ray Salvo
Software Engineer
Who is Participating?

Improve company productivity with a Business Account.Sign Up

moduloConnect With a Mentor Commented:
PAQed, with points refunded (250)

Community Support Moderator
If you have the version that came with Visual Studio, you have CR.Net which is a subset of CR9.  The hotfix may not be applicable.

Check for hotfixes for CR.Net.  Check whether you have CR.Net or CR.Net 2003.

Sounds like you've got the .Net version (with Visual Studio???).  If so you need this hotfix instead: http://support.businessobjects.com/communityCS/FilesAndUpdates/crnet11win_en.zip.asp

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

raysalvoAuthor Commented:
OK, well I did try downloading and installing the hotfix yesterday afternoon.  It may have fixed some problems but did not fix my formating problem.  I do have a request in with the Crystal Reports group and their representative is going to be sending me a link to download CR 9.2.2.x.  I have not been able to determine the exact version of CR bundled with my VS .NET.

What I am not hearing from you guys is any commentary regarding design formatting tricks, anomalies, or work arounds in the CR design user interface that might cause or affect this problem.  Have you not heard of any either the general public or I should be aware of?

-Ray Salvo
Software Engineer

>>> when I copy and paste that report to another Microsoft Word document, some of the formatting is lost

You're talking copy from Word to Word, right?  Is is possible that you aren't copying everything - specifically all of the hidden tables etc that are embedded in there?

If you're talking about the export itself, what you're going to find w/ Crystal is that the export to Word or Excel isn't going to be any better than "that's sortof close".  

Most of the experts here will probably tell you that if you plan to export to an MS Office format, you'll probably want to design a report so that the exported fields give you a good result - but this may mean that when viewing the report in Crystal it looks like crap.  Personally if I have a report that I know will be exported I create a "viewable" version and an "exportable" version.  This is an unfortunate side-effect of the fact that crystal's export simply isn't on the money.

>>> I have not been able to determine the exact version of CR bundled with my VS .NET

You can check the properties of one of the Crystal items added to your project.  In VisStudio, in the solution explorer, click on any of the CrystalDecisions.xxx  entries under references.  Then check the properties for the item and the last property should be "version" which will probably show 9.something.

Hotfix will not update your crystal from version 9.0 to 9.2 - at least, it didn't do it for me.
 Download .NET version of 9.2 from http://support.businessobjects.com/, I can't find that link right now.

Lady Linet
raysalvoAuthor Commented:
OK, well I downloaded CR version 9.2.2.x after contacting a Business Objects / CR representative.  For some reason, she had to send me a new product key code because mine was no longer valid.  I then ran the latest Service Pack update and I am now in much worse shape than when I started.  When I export the data to an MS Word document, I get an error message which reads as follows:

"Error in File C:\\DOCUME~1\\RAYSAL~1\\LOCALS~1\\Temp\\temp_30c78a2e-7016-48a5-aebc-fb9b5c509fc2.rpt:\nFailed to load database information."

I am working on resolving this issue.  Perhaps when I can create this temporary file and actual file, then I will be able to determine whether I still have a formatting problem.  Right now, I cannot get the exported file at all.

By the way, I did try clicking on fields and sections in my report in order to determine the version.  There was no mention of a version detail listed in any of the properties pages.  However, on the merge modules, I am getting a version number "1.0" for the CR related .msm files.  Frankly, I was expecting to see a 9.x.x.x kind of number.

Here are some questions raised based upon my research.
1) There is a directory "C:\Program Files\Common Files\Crystal Decisions\2.0\bin" which contains a bunch of DLLs.  In order to fix errors of this nature the CR people have suggested copying various dlls to the c:winnt\system32 directory.  Should I be thinking of copying some DLL to that windows directory?  If so, which one?
2) Should I be thinking about resetting the links between the fields in my designed report and the database?  (This seems a bit extreme.)
3) Has anyone out there seen a similar message and resolved this?

-Ray Salvo
Software Engineer
raysalvoAuthor Commented:
OK, well I don't know whether anyone is still following this question.  I have a few answers.  

1) In order to determine what version I was using, I had to navigate in my windows browser to the directory containing the CR files, right click to properties, and then I could determine the precise version number.

2) Even the latest version and hotfixes did not fix my overlay/underlay problems.

3) What I did do to fix the overlay/underlay problems was to open the Section Expert and go to the Group Header and add a "New Page After" in the group preceding my details sections.  Additionally, I had to add a "New Page After" in the Group Footer following my details sections.  Otherwise the text of my report would underlay at the end of the pasted section.  This hocus-pocus seemed a bit strange.  

4) Just to answer the obvious: No underlay option is checked in any section of my CR design.  

5) I have yet to experiment with changing the exported format from .doc to .rtf.  I will be trying that shortly and can report my findings.

6) Perhaps someone knows why I have to insert these New Page directives and how I might be able to avoid doing this and still export, then copy/paste without an underlay side affect.

Hopefully this helps someone else facing a similar problem.

-Ray Salvo
Software Engineer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.