Jump to content

abhimanyu.prasad
Go to solution Solved by abhimanyu.prasad,

Recommended Posts

I have already gone though the instructions provided at http://community.jaspersoft.com/questions/523992/tip-embedding-images-reports


But, when I declare a variable in my JRXML file something like:


<variable name="image" class="java.lang.String">
<variableExpression>
<![CDATA[iVBORw0KGgoAAAAN2TywgvThXo6zmQqSkeB29keB9/JGVlWmyjrJu5yV7vvbwVfZpMt6baX2QZZVhw1rB1cWfZLQN3dMKWddRRY6t9N1ncr6dI4uSfRDossO1g8/ZqkJ8sKOZKQrKj5/LTNuKHkha53kxXF33bSqHdnyEXWVOurL+B6suSKZ5xvPFlRUh6V1hsx7ydr54HF0+/7i5pZ1tQgLr/a7cmyXsXQYVlRthFIl/l8Z91+eEdZUbr1yKI+WADOsqYJ/fKPBnxZYgQd5+aArI3ymvWNbfchzz1lRXEefFpeHEWpb/05ii9LzBTjZnXqPTfse2tSuQU21krDeWp8Ttbrniw50TXKz/04Rp1+6PTl1h861eZlIbEPmelxRNwu18yHBl1ZvfoqAw9x0+JTW81fVF2EJLIKUGVWTDRFnPKIbDj9ztMyD5Zbj5DDLWsy1F7+CZ32g18v1tiMj3WTFf3SOU82XvqxvqgPCOa0E5t3EVbSZ19kzckfXvDjzAtYsvpXup2xAVmCTCyufkw/KJeHkrdm8P+EblZ+mwZk/xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANyRfwA6ydK0t2f0GgAAAABJRU5ErkJggg==]]>
</variableExpression>
</variable>
[/code]

I always get compilation errors.


Can anyone suggest me any solution for this?

 

Thanks

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

Hey thanks a lot, Ben. Actually, I had tried with the double quotes, but I was always evaluating it under <variableexpression>. The same thing worked if we do the same inside <initialValueExpression>:

<variable name="encImage" class="java.lang.String">       <initialValueExpression><![CDATA["iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAMAA…"]]></variable>[/code]

The thing striked as soon as I saw your reply.  

Regards,

Abhimanyu

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