以下属性在报告级别上不起作用:
<property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/><property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/>
您必须将它们放在“报表元素”上(即):
<staticText> <reportElement x="0" y="100" width="100" height="20"> <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/> <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/> </reportElement> <textElement/> <text><![CDATA[Your Static Text]]></text> </staticText>
另外,我建议您尝试使用更有用的net.sf.jasperreports.export.xls.column.width属性。参考:http :
//jasperreports.sourceforge.net/config.reference.html



