Search code examples
obiee

Conditional formatting with repository variable


I am trying to conditionally format a graph with a repository variable. My goal is to end with a number between 1-12 which corresponds to the current month.

When I try,

biServer.variables['CURRENT_MONTH']

I get the following error:

Graphing engine is not responding. "A fatal error occurred while processing the request. The server responded with: oracle.bi.nanserver.fwk.exception.BISvsException: java.lang.NumberFormatException: For input string: "2014 / 07"."

Trying the following,

RIGHT(biSerber.variables['CURRENT_MONTH'],2)

I get an error:

"A type mismatch occurred while evaluating an expression."

Finally, the follow also errors.

RIGHT('biServer.variables['CURRENT_MONTH']',2)

"The syntax of the expression to be evaluated is invalid."

Anyone have ideas? Thanks.


Solution

  • I ended up with a workaround that is serviceable but not ideal.

    I added a new column and created a custom formula where the month number, in this case "7", is compared to the repository value CURRENT_MONTH. If CURRENT_MONTH is greater than 7, then return ".", else return "null". (The period being the least noticeable character I could think of)

    From here I added the new column to the graph and set a conditional format on that column where if the value is equal to not null (a period in this instance), apply the desired conditional format.

    The following link was most helpful for me. http://bidirect.blogspot.com/2013/10/conditional-formatting-is-it-possible.html