r2 - 25 Jul 2007 - 03:55:38 - LeeYan?You are here: TWiki >  Main Web  >  ElixirReport > ElixirReportCookbook > DynamicContent

Dynamic Content

This sample demostrates how to render different sections based on different values. During the rendering stage, the Render If script will run.

The following is an example:

1) Add in the following script in the Section Wizard/Scripts under Render If for Section 1 -

var ds = DataCacheManager.getCache("DataSource 1");
ds.getString("Fruit") == "Apple";

2) Add in the following script in the Section Wizard/Scripts under Render If for Section 2 -

var ds = DataCacheManager.getCache("DataSource 1");
ds.getString("Fruit") == "Orange";

An explanation for the above is -

Section 1 will execute if the value from the datasource is "Apple" and execute Section 2 if the datasource is "Orange".

Sample

-- ZacSim? - 23 Jul 2007

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback