jasper reports - How do I make a dynamic image in iReport? -
i have image in report. in image expression, want this:
if ($f{num} >= 10) { "c:\\users\\zoudi\\workspace\\bfms\\red.jpg" } else if ($f{num} > 0) { "c:\\users\\zoudi\\workspace\\bfms\\red.jpg" } else {} obviously, syntax not correct. correct way go creating dynamic image this? thanks!
if you're using groovy, try:
($f{num} >= 10) ? "c:\\users\\zoudi\\workspace\\bfms\\red.jpg" : ($f{num} > 0) ? "c:\\users\\zoudi\\workspace\\bfms\\blue.jpg" : "c:\\users\\zoudi\\workspace\\bfms\\yellow.jpg"
Comments
Post a Comment