ByteArrayInputStream byteIS = (ByteArrayInputStream)rcd.getPrintOutputController().export(ReportExportFormat.PDF);
byte[] buf = new byte[2000 * 1024];
response.reset(); response.setHeader("content-disposition", "inline;filename=untitled.pdf"); response.setContentType("application/pdf");
int nRead = 0; while ((nRead = byteIS.read(buf)) != -1) { response.getOutputStream().write(buf, 0, nRead); }
response.getOutputStream().flush(); response.getOutputStream().close();
void ExportToPDF(ReportClientDocument rcd) { ByteArrayInputStream byteIS = (ByteArrayInputStream)rcd.getPrintOutputController().export(ReportExportFormat.PDF); byte[] buf = new byte[2000 * 1024]; response.reset(); response.setHeader("content-disposition", "inline;filename=untitled.pdf"); response.setContentType("application/pdf"); int nRead = 0; while ((nRead = byteIS.read(buf)) != -1) { response.getOutputStream().write(buf, 0, nRead); } response.getOutputStream().flush(); response.getOutputStream().close(); }
SAP BusinessObjects http://www.sap.com/sapbusinessobjects/ Support services http://service.sap.com/bosap-support/ Product Documentation on the Web http://help.sap.com/ |