I'm looking for a way to define the background image base on value of my data set. For instance, if "Country" is USA, then> imgBG1.jpg, and if country is Sweden, then> imgBG2.jpg
The previous post ""How to set a background image on the MasterPage?"" https://communities.opentext.com/forums/discussion/44730/how-to-set-a-background-image-on-the-masterpage
gives the first part of the answer
reportContext.getReportRunnable().getDesignInstance().getMasterPage("MasterPageName").getStyle().backgroundImage = "FileLocation";
Now, in a script of the table that contains my field, how do a evaluate the value of a field? I tried a basic.
if(this.dataSetRow["Country"]=="Sweden") {
reportContext.getReportRunnable().getDesignInstance().getMasterPage("Simple MasterPage").getStyle().backgroundImage = "img/imgBG2.jpg"; }
This gives error TypeError: Cannot read property "Country"
I guide I am missing a context.
Thx