Hi guys, I am using jasperreport-1.2.8. And currently I am trying to display this string "satu<sub>dua</sub>". Currently I need to code everything manually instead of using iReport. When I used the following piece of code: public JRDesignStaticText createBox( int x, int y, int width, int height, String charName){
JRDesignStaticText staticText = new JRDesignStaticText(); staticText.setStyledText(true); staticText.setX(x); // left staticText.setY(y); // top staticText.setWidth(width); // width staticText.setHeight(height); // height // border staticText.setBorder(BORDER_ON); staticText.setTopBorder(THIN_BORDER); staticText.setBottomBorder(THIN_BORDER); staticText.setLeftBorder(THIN_BORDER); staticText.setRightBorder(THIN_BORDER); // appearance staticText.setFontSize(FONT_SIZE); staticText.setMode(JRElement.MODE_TRANSPARENT); staticText.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_CENTER); staticText.setVerticalAlignment(JRAlignment.VERTICAL_ALIGN_MIDDLE); staticText.setStyle(normalStyle()); staticText.setText(charName); return staticText; } I got this error: [Fatal Error] :1:15: The entity name must immediately follow the '&' in the entity reference. 17:01:15,627 WARN JRFillTextElement:471 - Invalid styled text. org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference. 17:01:15,637 WARN JRFillTextElement:471 - Invalid styled text. org.xml.sax.SAXException: Tag <sub> is not a valid styled text tag. Help me guys...... -- View this message in context: http://www.nabble.com/invalid-styled-text--tf4303940.html#a12250914 Sent from the jasperreports-questions mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions