默认情况下jasperserver中报表导出到EXCEL的时候,是忽略掉图片的。
要想将图片导出到excel,须将applicationContext.xml文件中的
<bean id="xlsExportParameters" class="com.jaspersoft.jasperserver.api.engine.jasperreports.common.XlsExportParametersBean">
<property name="detectCellType" value="true"/>
<property name="onePagePerSheet" value="false"/>
<property name="removeEmptySpaceBetweenRows" value="true"/>
<property name="removeEmptySpaceBetweenColumns" value="true"/>
<property name="whitePageBackground" value="false"/>
<property name="ignoreGraphics" value="true"/>
<property name="collapseRowSpan" value="true"/>
<property name="ignoreCellBorder" value="true"/>
<property name="fontSizeFixEnabled" value="true"/>
<property name="maximumRowsPerSheet" value="0"/>
<property name="xlsFormatPatternsMap" ref="formatPatternsMap"/>
</bean>
换成
<bean id="xlsExportParameters" class="com.jaspersoft.jasperserver.api.engine.jasperreports.common.XlsExportParametersBean">
<property name="detectCellType" value="true"/>
<property name="onePagePerSheet" value="false"/>
<property name="removeEmptySpaceBetweenRows" value="true"/>
<property name="removeEmptySpaceBetweenColumns" value="true"/>
<property name="whitePageBackground" value="false"/>
<property name="ignoreGraphics" value="false"/>
<property name="collapseRowSpan" value="true"/>
<property name="ignoreCellBorder" value="true"/>
<property name="fontSizeFixEnabled" value="true"/>
<property name="maximumRowsPerSheet" value="0"/>
<property name="xlsFormatPatternsMap" ref="formatPatternsMap"/>
</bean>