Aspose.Word with LocalReport only (.Net)

Hi,

We are in the process of evaluating .Net Aspose.Word but would like to know if it is possible to render a word document from a LocalReport (RDLC) without having to instantiate a ReportViewer object or call the ReportingServices service?

We utilise the built-in Microsoft PDF rendering at present with the following code:

report.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings);

Ideally we would simply call the AddExtension method on the LocalReport before this line of code, rather than create a ReportViewer object and call AddExtension on that just to render a Word document.

Thanks in advance

T

Hi
Thanks for your request. You can use the same technique as described here, but without ReportViewer:
https://docs.aspose.com/words/reportingservices/integrate-with-microsoft-report-viewer-in-local-mode/
In this code, ReportViewer is needed onto to get the LocalReport, so you can add extension directly to your LocalReport. After this you can use code like the following to render your report:

string extension;
string mimeType;
string encoding;
Warning[] warnings;
string[] streamIds;
byte[] reportBytes = myLocalReport.Render("AWDOCX",
        GetDeviceInfoString(layoutType),
        out mimeType,
        out encoding,
        out extension,
        out streamIds,
        out warnings);

Hope this helps.
Best regards,

Worked a treat! Thanks for your help