cheeka Posted September 25, 2006 Share Posted September 25, 2006 Image background for the image is not set for HTML reports. However, for the PDF reports image background is set. The image expression set as string. Here is the code snippet for the image tag. Code:<image evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Transparent" x="1" y="1" width="11" height="20" forecolor="#00CCCC" backcolor="#006699" key="image-1" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <graphicElement stretchType="NoStretch" pen="None"/> <imageExpression class="java.lang.String"><![CDATA[($F{state}.intValue()==2 || $F{state}.intValue()==0)?"images/nrd/show.gif":"images/nrd/hide.gif"]]></imageExpression> <anchorNameExpression><![CDATA["reportrow"+$F{id}]]></anchorNameExpression></image> My question is how to set background color for the images in HTML format. Link to comment Share on other sites More sharing options...
lucianc Posted September 26, 2006 Share Posted September 26, 2006 Are you sure that the image background works in PDF? Do you have a rectangle bellow this image having the same background? If you want to fill the image element with the background color, you need to set mode="Opaque" for the image. HTH,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now