protected TextValue getDateCellValue(JRPrintText text, String textStr) throws ParseException { TextValue textValue; String pattern = text.getPattern(); if (pattern == null || pattern.trim().length() == 0) { textValue = getTextValueString(text, textStr); } else { DateFormat dateFormat = getDateFormat(getTextFormatFactoryClass(text), pattern, getTextLocale(text), getTextTimeZone(text)); Date value = null; if (textStr != null && textStr.length() > 0) { value = dateFormat.parse(textStr); } textValue = new DateTextValue(textStr, value, pattern); } return textValue; }
/** * @deprecated Replaced by {@link #getHyperlinkProducer(JRPrintHyperlink)}. */ protected JRHyperlinkProducer getCustomHandler(JRPrintHyperlink link) { return getHyperlinkProducer(link); } }
exporter.setParameter(JRExporterParameter.JASPER_PRINT, print); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos); exporter.exportReport(); final byte[] data = baos.toByteArray(); if (log.isDebugEnabled())
Number value = defaultParseNumber(textStr, JRClassLoader.loadClassForRealName(text.getValueClassName())); textValue = getTextValueString(text, textStr); NumberFormat numberFormat = getNumberFormat(getTextFormatFactoryClass(text), pattern, getTextLocale(text));
if (text.getValueClassName() == null) textValue = getTextValueString(text, textStr); if (java.lang.Number.class.isAssignableFrom(valueClass)) textValue = getNumberCellValue(text, textStr); textValue = getDateCellValue(text, textStr); textValue = getBooleanCellValue(text, textStr); textValue = getTextValueString(text, textStr); textValue = getTextValueString(text, textStr); textValue = getTextValueString(text, textStr);
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, output); exporter.exportReport();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); ByteArrayOutputStream output = new ByteArrayOutputStream(); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, output); exporter.exportReport(); byte[] report = output.toByteArray(); response.setContentLength(report.length);