目前我正在使用MySql DB研究iReport。
我使用 servlet 将图像保存为字符串 id,而不是图像名称(如 helal.JPG)。但我无法在iReport上将其呈现为图像。
有人可以帮忙吗?
目前我正在使用MySql DB研究iReport。
我使用 servlet 将图像保存为字符串 id,而不是图像名称(如 helal.JPG)。但我无法在iReport上将其呈现为图像。
有人可以帮忙吗?
对于 200 x 300 的图像,请使用<imageExpression>
字符串参数。
例如
<parameter name="IMG_PATH" class="java.lang.String"></parameter>
...
<image ...>
<reportElement x="0" y="0" width="200" height="300"/>
<imageExpression class="java.lang.String">
<![CDATA[$P{IMG_PATH}]]>
</imageExpression>
</image>
另请参阅http://jasperreports.sourceforge.net/sample.reference/images/index.html