I am looking for the ability to use the value of a parameter passed into the report to be used as the hex colour value of the background in a conditional style, does anyone know how to achieve this?
My code so far:
<style name="Parameterised Text Colour">
Any help is greatly appreciated
As far as I know the color attributes are just static ones.... so you can't set these to a dynamic value concerning at a parameter or even a field expression.
I created a java "PreProcessor" when loading the jrxml (per JasperAPI) and changed the style colors per JRDesignAPI (so e.g. each month could have another color defined by the user. so I created 12 styles per API and set the style background-color to the database value, afterwards I recompile the (changed) design and pass this to the normal fill manager. Works fine for my purose. :-) Perhaps just an idea for your solution (if you also call your reports from a java application)
hth + regards