Generate .doc document ?

Stimulsoft Reports.NET discussion
Post Reply
Houssam Hamdan
Posts: 33
Joined: Fri Aug 20, 2010 3:46 am
Location: Lebanon - Beirut

Generate .doc document ?

Post by Houssam Hamdan »

Hello,

Is there a way to rename the .rtf document generated by Stimulsoft.Report.Web.StiReportResponse.ResponseAsRtf(this, objReport) method to .doc ?

A feasible workaround would be also accepted.

Thank you for your cooperation.

Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Generate .doc document ?

Post by Andrew »

Hello,

Unfortunately, there is no ready solution.
Integration of a property to choose file extension would require very large changes in the code, so we do not plan to do this.
As a workaround, if you have the source code of our product, you can change the default file extension for export to RTF in the StiReportResponce class.

Thank you.
Houssam Hamdan
Posts: 33
Joined: Fri Aug 20, 2010 3:46 am
Location: Lebanon - Beirut

Generate .doc document ?

Post by Houssam Hamdan »

Solution:

MemoryStream objMemoryStream = new MemoryStream();
StiRtfExportService objStiRtfExportService = new StiRtfExportService();
objStiRtfExportService.ExportRtf(objReport, objMemoryStream, objStiRtfExportSettings);
StiReportResponse.ResponseAs(this, objMemoryStream, "application/msword", "FileName.doc", true);

Cheers )
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Generate .doc document ?

Post by Andrew »

Thank you sharing your solution.
Post Reply