Hi all,
I wanna dynamically add images to a cell by validating a condition, my condition is as follows,
I wanna dynamically add images to a cell by validating a condition, my condition is as follows,
Code: |
$F{row1} . intValue() == 1 ? 0 : 1</td></tr></tbody></table><br /> <br /> <br /> Now wanna to change this condtion to something like this<br /> <br /> <table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"><tbody><tr><td><b>Code:</b></td></tr><tr><td><pre>$F{row1} . intValue() == 1 ? image1 : image2</td></tr></tbody></table><br /> <br /> <br /> How can i achieve it<br /> <br /> Thanx in advance<br /> <br /> -Nithya |
1 Answer:
Posted on August 23, 2006 at 5:23pm
This one works for me.
Add an image on your report, click properties and then add this formula in tab Image -> Image Expression:
$F{row1} . intValue() == 1 ? "C:\\MyApp\Images\image1.gif":"C:\\MyApp\Images\image2.gif"
Make sure you have image1.gif and image2.gif in above folder.
Add an image on your report, click properties and then add this formula in tab Image -> Image Expression:
$F{row1} . intValue() == 1 ? "C:\\MyApp\Images\image1.gif":"C:\\MyApp\Images\image2.gif"
Make sure you have image1.gif and image2.gif in above folder.