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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -