Skip to Content
Former Member
Jun 01, 2010 at 08:27 PM

Need help setting export options


I'm working on replacing our old RDC component with the new Java SDK.

I purchased Crystal Reports 2008 and downloaded the SDK. Now I'm trying to run a simple example exporting a report to word. I've built it off of the other export examples I've seen on the site. None of them seem to give me an up to date example of how to set export options though.

Exporting seems to work when I export using this:

ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream) report.getPrintOutputController().export(ReportExportFormat.MSWord);

But not when I do this:

ExportOptions opt = new ExportOptions();


RTFWordExportFormatOptions myOptions = new RTFWordExportFormatOptions();


ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream) report.getPrintOutputController().export(opt);

Is there something I'm missing? I want to be able to explicitly set my export options - especially for other export formats like excel.