Jump to content
We've recently updated our Privacy Statement, available here ×

watermarks background images


2004 IR Help

Recommended Posts

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

  • 10 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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" >

<reportElement

x="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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...