BIRT: Dynamic Image Examples

VirgilVirgil AdministratorEM admin
edited July 1, 2013 in DevShare Downloads
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.

Virgil Dodson
OpenText Analytics Developer Community
https://forums.opentext.com/forums/categories/analytics

Sign In or Register to comment.