Eugene Shmorgun
Eugene Shmorgun

Reputation: 2075

Element type "conditionalStyle" must be declared - error after adding new style

I added new style to my jrtx file:

<style name="BackgroundStyle" mode="Opaque" backcolor="gray">
  <conditionalStyle>
    <conditionExpression>Boolean.valueOf($V{REPORT_COUNT}.intValue() % 2 == 0)</conditionExpression>
    <style backcolor="lightGray"/>
  </conditionalStyle>
</style>

And in the report errors I see - Caused by: org.xml.sax.SAXParseException: Element type "conditionalStyle" must be declared.

Help me to fix it, please

Upvotes: 0

Views: 642

Answers (1)

Ahmed Salem
Ahmed Salem

Reputation: 1757

The problem was constraint in Jasper not to use conditional style with Template option Solution to use it in style direct not in template

Upvotes: 1

Related Questions