{"id":2720,"date":"2022-08-30T15:27:13","date_gmt":"2022-08-30T15:27:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/08\/jrxml-operator-error-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:27:13","modified_gmt":"2022-08-30T15:27:13","slug":"jrxml-operator-error-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/jrxml-operator-error-collection-of-common-programming-errors\/","title":{"rendered":"JRXML operator error-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m getting this error when compiling my JRXML file in iReport 3.1.2:<\/p>\n<p><code>com.jaspersoft.ireport.designer.errorhandler.ProblemItem@f1cdfb The operator &gt; is undefined for the argument type(s) java.lang.Integer, java.lang.Integer net.sf.jasperreports.engine.design.JRDesignExpression@eb40fe<\/code><\/p>\n<p>The only place in my entire report where I use the operator &gt; is here:<\/p>\n<pre><code>\n     new Integer(\"0\")) ? new String(\"AND loctn_sctn_id = \" + $P{sectionId}) : new String(\"\")]]&gt;\n    \n\n<\/code><\/pre>\n<p>Google hasn&#8217;t been my friend on that one. Any Jasper template expert out there has a vague idea on what&#8217;s going on?<\/p>\n<ol>\n<li>\n<p>Figured out how to compare 2 Integers in the JRXML. Instead of doing this:<\/p>\n<pre><code>$P{sectionId} &gt; new Integer(\"0\")\n<\/code><\/pre>\n<p>The solution is this:<\/p>\n<pre><code>$P{sectionId}.compareTo(new Integer(\"0\")) != 0\n<\/code><\/pre>\n<p>That looks a little convoluted but it works for me. \ud83d\ude42<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2014-02-08 03:35:26. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m getting this error when compiling my JRXML file in iReport 3.1.2: com.jaspersoft.ireport.designer.errorhandler.ProblemItem@f1cdfb The operator &gt; is undefined for the argument type(s) java.lang.Integer, java.lang.Integer net.sf.jasperreports.engine.design.JRDesignExpression@eb40fe The only place in my entire report where I use the operator &gt; is here: new Integer(&#8220;0&#8221;)) ? new String(&#8220;AND loctn_sctn_id = &#8221; + $P{sectionId}) : new String(&#8220;&#8221;)]]&gt; Google hasn&#8217;t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2720","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2720"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2720\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}