tkepic Posted November 13, 2013 Share Posted November 13, 2013 Hi folks,I have a defined custom style at report level with an condition which is based on field from query: <style name="Crosstab Data Text" mode="Transparent" hAlign="Center"> <conditionalStyle> <conditionExpression><![CDATA[new Boolean( $F{TYP_HH} == 'D' )]]></conditionExpression> <style mode="Opaque" forecolor="#FFFFFF" backcolor="#FF9999"/> </conditionalStyle> </style>[/code] When I use this style for any field in report (outside crosstab), then it works fine. But I would like to use it within Crosstab. A problem is, that when a report is compilled an error occurs: net.sf.jasperreports.engine.design.JRValidationException: Report design not valid : 1. Field not found : TYP_HH Style evaluation at report level is set to TRUE:<property name="net.sf.jasperreports.style.evaluation.time.enabled" value="true"/> [/code]Any idea or trick how to apply conditional formatting within Crosstab? Thanks,Tomas Link to comment Share on other sites More sharing options...
pavan.elthepu Posted February 3, 2015 Share Posted February 3, 2015 Hi Tomas,Did you find any answer for this? Link to comment Share on other sites More sharing options...
ericfraselle Posted June 9, 2015 Share Posted June 9, 2015 It's just because when the style is use in the report you have to use $V instead of $F to defined the condition.Because in the crosstab, it's variables that are used instead of fields.If you when to used same style in and out of the crosstab, create to different style.Regards,Eric. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now