cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically read .rpt file, datasource and write it to word using ..

Former Member
0 Kudos

I am using Crystal Reports 2008. The default editable rtf export format is tab based, really not useful for table formatted data.

I would like to read rpt file along with data (e.g. saved xml source data) and write it to ms word format using com objects. Is this possible? If yes and supporting tutorial or information.

2nd: Is there any available ready software/tool to a true word format conversion?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member208657
Active Contributor
0 Kudos

We refer to this as exporting a report. There are other export formats available like - RichText, and WordForWindows. Have you tried either of those formats?

My suggestion is to find a format you like to export by using the Crystal Reports designer. Then, export the report through code to that same format.

Also re: using COM. You are better off going to .NET because the sun is setting on our support for COM. Crystal Reports XI R2 is the last version where we support the RDC COM SDK. And all support is ending for that on June 30th, 2011.

Former Member
0 Kudos

I would like to get tables in editable format. Which clearly none of existing crystal reports (v12.3.x) export format support. So I am looking for alternative.

Is SAP is going to provide this functionaliy in upcoming versions? How could we get this information?

former_member183750
Active Contributor
0 Kudos

The runtime APIs can not do more than the CR 2008 designer. E.g.; if you can not do it in the designer, you more than likely can not do it at runtime...

Re.: I would like to get tables in editable format

- Rich text? What ever formats you have available in the CR designer, you have available at runtime, certainly not more...

Re'; +Is SAP is going to provide this functionaliy in upcoming versions? +

- Not that I am aware of.

Perhaps a good post to the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

- Ludek

Edited by: Ludek Uher on Apr 19, 2011 7:31 AM

former_member208657
Active Contributor
0 Kudos

I understand what you are looking for now. The editable Word export format uses tabs to space columns in alignment, rather than using tables with clear borders. As far as I know there are no plans to change this. Our Word export format is done in one of two ways.

1. Microsoft Word (97-2000) Editable

Exported in an "in line" positioning type format. This allows for easier addition of information after the export is done. Exact positioning is lost with this format.

2. Microsoft Word (97-2000)

Report objects are exported as text boxes to allow for exact positioning of elements. This allows for a more accurate representation of the report in Word format. However, it is more difficult to add/modify the report in this format.

As Ludek mentioned, you can submit your idea to Idea Place - http://www.sdn.sap.com/irj/scn/idea-place. It might gain traction and popularity if the community agrees with your idea.

Former Member
0 Kudos

@Ludek: Thanks for your time. I will write on idea place.

Former Member
0 Kudos

@David: Thank you very much for your time and explaination. Next time I will certainly try to write my Q's more clearly. As said to Ludek I would put this on idea place.

ido_millet
Active Contributor
0 Kudos

One of the 3rd-party Crystal Reports Desktop Scheduling tools listed at: http://www.kenhamady.com/bookmarks.html provides that functionality. It allows you to automate the process of inserting Crystal reports formula content into a Word document acting as a template. The content can be inserted into pre-formatted Word tables or into pre-formatted Word text objects. The result can then be saved to a dynamically named (based on info inside the Crystal report) target Word document, and emailed to a dynamic destination.

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

I would like to read rpt file along with data (e.g. saved xml source data) and write it to ms word format using com objects. Is this possible? If yes and supporting tutorial or information.

- Export to XML(?)

Sample; vbnet_win_export.zip at [this|http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples] link.

Developer Help files:

https://boc.sdn.sap.com/developer/library

[Crystal Reports for Visual Studio 2005 Walkthroughs|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]

Above will apply to your version of CR and .NET also.

Is there any available ready software/tool to a true word format conversion?

- Not from SAP. Perhaps some 3rd party software(?).

Oh, and the wiki [Available Export Formats, Crystal Reports 9.1 to Crystal Reports 2008|http://wiki.sdn.sap.com/wiki/display/BOBJ/AvailableExportFormats%2CCrystalReports9.1toCrystalReports+2008] may be good to have also.

- Ludek