Skip to Content
0
Former Member
Dec 16, 2007 at 12:31 PM

Export a report to excel (using JRC)

60 Views

Post Author: guyi

CA Forum: JAVA

hi,I am using JRC to open and view a report in my java application.

I tried to export a report to excel format without any success, for that I am using the ReportExportControl as you can see in the below scrap of code: IReportSource reportSource= (IReportSource) session.get(request).get("reportSource"); ReportExportControl exportControl = new ReportExportControl(); ExportOptions exportOptions = new ExportOptions(); exportOptions.setExportFormatType(ReportExportFormat.MSExcel); exportControl.setReportSource(reportSource); exportControl.setExportOptions(exportOptions); exportControl.setExportAsAttachment(true); String htmlContent = exportControl.getHtmlContent(request, response, request.getSession().getServletContext());Am I doing something wrong here?Any idea?Thanks in advanceGuy