<header> <row id="8"> <cell id="9"> <property name="whiteSpace">nowrap</property> <property name="overflow">visible</property> <label id="23"> <property name="display">block</property> <text-property name="text">Now is the time for all good men to come to the aid of their party.</text-property> </label> </cell> <cell id="10"/> <cell id="11"/> </row> </header>
<tr valign="top" align="left"> <th class="style_1" style=" overflow:hidden;font-weight: normal;"> <div id="AUTOGENBOOKMARK_1">Now is the time for all good men to come to the aid of their party.</div> </th> <th style=" overflow:hidden;font-weight: normal;"></th> <th style=" overflow:hidden;font-weight: normal;"></th> </tr>
Quote: |
Can you post what options you are setting for the HTMLRenderOption instance? Are you setting renderOption.setEnableAgentStyleEngine(false); |
/** Runs a report. * * @param format Report format = "html", "pdf", or "xls". * * @param params A hasmap mapping parameter names to parameter values. * * @param request Http request. * * @return The report in a byte array. * * @throws Exception */ public static byte[] runReport (String format, HashMap<String, String> params, HttpServletRequest request) throws Exception { String reportName = params.get("Report name"); ReportInfo reportInfo = ReportInfo.getInfo(reportName); String reportPath = reportsDirPath + "/" + reportName + ".rptdesign"; IReportRunnable design = engine.openReportDesign(reportPath); IRunAndRenderTask task = engine.createRunAndRenderTask(design); RenderOption options = null; if (format.equals("html")) { HTMLRenderOption htmlOptions = new HTMLRenderOption(); htmlOptions.setImageHandler(new HTMLServerImageHandler()); htmlOptions.setEmbeddable(true); htmlOptions.setBaseImageURL(request.getContextPath() + "/birt-images"); htmlOptions.setImageDirectory(imagesDirPath); options = htmlOptions; } else if (format.equals("pdf")) { PDFRenderOption pdfOptions = new PDFRenderOption(); if (reportInfo.singlePage) pdfOptions.setOption(PDFRenderOption.PAGE_OVERFLOW, PDFRenderOption.FIT_TO_PAGE_SIZE); options = pdfOptions; } else { EXCELRenderOption xlsOptions = new EXCELRenderOption(); options = xlsOptions; } options.setOutputFormat(format); ByteArrayOutputStream stream = new ByteArrayOutputStream(); options.setOutputStream(stream); task.setRenderOption(options); task.setParameterValues(params); task.run(); task.close(); return stream.toByteArray(); }