2004 IR Help Posted August 21, 2006 Share Posted August 21, 2006 By: woodchuck - woodchuck5 watermarks background images 2005-04-13 09:07 hihi, how do i add a watermark or background image to my reports in both PDF and HTML format? i used the iReport tool to generate the .jrxml files for me but it doesn't do the watermark correctly in HTML format (PDF background image is working). does anyone know the .jrxml code to add a background image to an HTML format report? i can modify the .jrxml file manually. thanks, woodchuck Link to comment Share on other sites More sharing options...
Gustaf Posted June 21, 2007 Share Posted June 21, 2007 Insert the following line after </group><background><band height="690" isSplitAllowed="true" ><image scaleImage="Clip" vAlign="Bottom" hAlign="Left" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" ><reportElementx="0"y="8" width="534" height="676" key="image" stretchType="RelativeToBandHeight"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <graphicElement stretchType="RelativeToBandHeight"/> <imageExpression class="java.lang.String"><![CDATA["imglocation.ext"]]></imageExpression> </image> </band> </background> Then play around with the values to adjust the image to the report. Somehow it didn't work for me to add the image directly on the background band, but adding the code in the jrxml and then opening the editoer worked fine. 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