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; }