Link to home
Start Free TrialLog in
Avatar of MikeMCSD
MikeMCSDFlag for United States of America

asked on

Can't edit Word document created by Crystal Reports

The Word documents that Crystal Reports create are hard or impossible to edit.
All the text fields are in "boxes" and it is hard to even just add a blank line or space.

Is there a formatting option in Word that I need to set or turn off to make it
more like a regular editable Word documet?

myReport.ExportOptions.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.WordForWindows
......
DiskOpts.DiskFileName = "C:\DCP\FileOne.doc"
myReport.ExportOptions.DestinationOptions = DiskOpts
myReport.Export()

thanks
Avatar of frodoman
frodoman
Flag of United States of America image

As far as I know there's nothing you can do with this directly.  I believe that Crystal exports a text object (for example) as an object instead of as normal text so in Word you're editing individual objects instead of the normal flow of text.

The only way I can think of to improve this would be to export your report into a rich text format (rtf) and then open it in Word.  This will get you the stream of text that you need for easy Word editing, but you might lose some of the formatting from your report.

frodoman
SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MikeMCSD

ASKER

thanks guys . .
I'm using CR 9 that comes with Visual Studio .Net.

ml . . you are right, even thought I use "C:\DCP\FileOne.doc" in the code, . . . if I open
the document and do "Save As", it shows  BL_08_13.rtf.

But still, it give the problem with the text boxes.  I can't even insert a line break.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
By the way, I used the word "limitation" but there is good reason for this behavior - it's the only way you can get some non-text elements into the Word document aligned properly.  So it's really a trade off - you lose the ease of an editable stream of text but you maintain the report formatting.

frodoman
CR does a great job of making a nice looking Word document . . .
but if I could only add a few lines of text to it!  I guess you can't have everything.
Avatar of Mike McCracken
Mike McCracken

Glad i could help

mlmcc