|
-
Jan 15th, 2004, 10:24 AM
#1
Thread Starter
PowerPoster
**RESOLVED ** exporting report to Word For Windows
I am experiencing a strange problem. I am trying to export a report to Word For Windows (2000) from my VB6 CR8.5 program (code follows). The document gets there, but when I bring it up in Word, it is blank, until I change the view to "print layout". Then the data is there, but it is grayed out. Any ideas?
Set Report = crxApplication.OpenReport("C:\CertificateofCompliance.rpt", 1)
Report.ExportOptions.FormatType = 14 'Word For Windows
Report.ExportOptions.DiskFileName = "C:\CertificateofCompliance.doc"
Report.ExportOptions.DestinationType = crEDTDiskFile
Report.Export False
Last edited by Pasvorto; Jan 30th, 2004 at 10:40 AM.
-
Jan 16th, 2004, 10:09 AM
#2
Thread Starter
PowerPoster
I have tried using this code instead:
Report.ExportOptions.FormatType = crEFTPortableDocFormat
Report.ExportOptions.DiskFileName = "C:\Certificate_of_Compliance_" & jobinx & ".pdf"
Report.ExportOptions.DestinationType = crEDTDiskFile
Report.Export False
However, when I run it with this code I get:
An error occurred: [-2147190908] Failed to export the report. - Source: Crystal Reports Active X Designer
I have checked and I have Exportmodeller.dll and Crtslv.dll and U2FwordW.dll present and registered. This is 8.5 Developer (I also have 9.0 installed on the same machine).
The problem with using the WordFor Windows export is that the text comes out "greyed" and uneditable. In addition, the bottom half of the page doesn't export at all.
-
Jan 18th, 2004, 01:13 AM
#3
Lively Member
The reason it is grayed out may be because it is being exported as a header/footer. You may want to try exporting to RTF and see what results you get.
-
Jan 19th, 2004, 08:41 AM
#4
Thread Starter
PowerPoster
I believe I tried that first, with the same result. In fact, an interesting thing. When you bring up Word to look at the document, it is blank. You must change to Printer View in order to see anything. And then it is greyed out.
-
Jan 30th, 2004, 06:43 AM
#5
New Member
Hi There,
I am new to this forum, just seen your problem, though not sure whether my late reply will yield something positive for you.
The same problem i had in past and i found this due to structure of crystal report. See if we design some report in Crystal and we put some data in Page Header/Footer. Now if we try to export this report at run time Crystal Report Engine checks in which format we are going to export, in ur case it is word format, then it puts everything writtern in Page Header/Footer into MS Word's page Header/Footer and also inherit all the related properties of MS Word's header and footer thats why you will see that grey area problem.
I had fixed this problem by moving the contents of Crystal Reports Page Heade/Footer into Group Header/Footer at design time then it wont create problem while exporting into Word format.
I hope this will help you!
Bob
-
Jan 30th, 2004, 10:40 AM
#6
Thread Starter
PowerPoster
Actually I solved the problem by upgrading to CR9 and exporting to PDF.
Report.ExportOptions.FormatType = crEFTPortableDocFormat
Report.ExportOptions.DiskFileName = "C:\Certificate_of_Compliance_" & jobinx & ".pdf"
Report.ExportOptions.DestinationType = crEDTDiskFile
Report.Export False
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|