7 Changing Images with Script
You can dynamically set the image file (GIF, JPG, etc.) of an image component using a variable or an expression. Follow the steps below:
1. Add an image element into the Viewsheet. Right-click and select the 'Properties' option. This opens the 'Image Properties' dialog box.
2. Select the Advanced tab and select 'Dynamic Image Selection'.
3. From the drop-down menu, select 'Expression' or 'Variable', depending on the mechanism you wish to use to set the image property.

.

4. If you choose 'Expression', click the 'Formula Editor' button, and add a script in the text area. A typical script might take the following form:
if(condition) {
'image1.gif';
} else {
'image2.gif';
}
You can specify an image by the uploaded image name (e.g., 'image1.gif'), a resource path on the server (e.g., '/library/image1.gif'), or a URL (e.g., “http://www.google.com/images/logos/ps_logo2.png”).
5. Click 'OK' to close the Formula Editor, and then click the 'OK' to close the 'Image Properties' dialog box.
The Image component now displays the specified image file.
See Also
Image, for scripting functions related to Images.
Creating an Image, in Dashboard Design, for information on uploading and referencing images.
| << 6.2 Aggregating Data in the Worksheet Data Block | © 1996-2013 InetSoft Technology Corporation (v11.4) | 8 Running a Query from Script >> |