Home DevShare designing-birt-reports

BIRT: Dynamic Image Examples

by vdodson

Posted Mar 03, 2008 (Edited Mar 03, 2008 )

(0 reviews, 1606 views)

Download (8.61 KB)

By downloading this item, you are agreeing to the Terms of Use for the site.

Example report designs that dyamically changes the image.

Two different approaches for getting dynamic images into a BIRT report design.  One approach use a script on the image onRender event to change the name of the image at runtime:

if(row["CREDITLIMIT"] < 25000 )
    this.file = this.file.replace("happy", "sad");


...and the other approach uses a computed column on the dataset to dynamically change the location of the image:

if (row["CREDITLIMIT"] <= 0) {
  "down.jpg"
} else {
  "up.jpg"
}

Both approaches pick up the image from a relative URL inside the same project.  These examples were created with BIRT 2.2.

Download (8.61 KB)

By downloading this item, you are agreeing to the Terms of Use for the site.



 
Filter More