Hi,
I am unable to load a base64 image in the detail band, even if the variable containing the base64 string has reset type "Page".
Please resolve. Below are the JRXML snippets:
<variable name="Diamond_Green" class="java.lang.String" resetType="Page">
<initialValueExpression><![CDATA["iVBORw0KGgoAAAA....X2DAAAAABJRU5ErkJggg=="]]></initialValueExpression>
</variable>
<detail>
<band height="355" splitType="Stretch">
<printWhenExpression><![CDATA[Boolean.TRUE]]></printWhenExpression>
<staticText>
<reportElement x="230" y="-3" width="90" height="17" uuid="242bc563-bec7-4f82-9a36-09149de95fef"/>
<textElement textAlignment="Right" verticalAlignment="Bottom">
<font fontName="VoyaArial" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Overall Status]]></text>
</staticText>
<image evaluationTime="Page">
<reportElement x="327" y="-1" width="16" height="16" uuid="2bc38b1a-1503-4c5d-a65c-9e46f7f81870">
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
</reportElement>
<graphicElement fill="Solid"/>
<imageExpression><![CDATA[new ByteArrayInputStream(Base64.decodeBase64($V{Diamond_Green}.getBytes()))]]></imageExpression>
</image>
</band>
</detail>
Please let me know what evaluation time/reset type combination I should use.
Thanks for the help.
Hello my friend, I'm in the same situation. Could you solvented this ?
Thanks for all.
- Log in or register to post comments
add comment
1 Answer:
Posted on February 3, 2017 at 12:50am
In this case keep the <initialValueExpression/> as it is, and set the <valueExpression /> of the variable with the same value as in <initialValueExpression/>.
The evaluation time of the image element could be left as "Page". Other appropriate values for the evaluation time are "Now" and "Auto".
Regards,
Sanda