{"id":2760,"date":"2022-08-30T15:27:33","date_gmt":"2022-08-30T15:27:33","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/08\/how-to-find-sum-of-column-in-ireport-or-jasper-report-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:27:33","modified_gmt":"2022-08-30T15:27:33","slug":"how-to-find-sum-of-column-in-ireport-or-jasper-report-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/how-to-find-sum-of-column-in-ireport-or-jasper-report-collection-of-common-programming-errors\/","title":{"rendered":"How to find sum of column in Ireport or jasper report?-Collection of common programming errors"},"content":{"rendered":"<p>I had a fields of Integer type and was trying to add the columns . I was not getting any error when the report is previewed but my java application was failing to compile the report and giving the error as<\/p>\n<blockquote>\n<p>The operator + is undefined for the argument type(s) java.lang.Integer, java.lang.Integer value = (java.lang.Integer)(((java.lang.Integer)field_nBSRptSchm1Col1.getValue())+((java.lang.Integer)field_nBSRptSchm2Col1.getValue())); \/\/$JR_EXPR_ID=8$<\/p>\n<\/blockquote>\n<p>then I used the following code to add the columns of Integer type&#8230;<\/p>\n<pre><code>new Integer($F{nSchm1Col1}.intValue() + $F{Schm2Col1}.intValue() )\n<\/code><\/pre>\n<p>where <code>nSchm1Col1<\/code> and <code>Schm2col1<\/code> are two fields which I want to add. This one worked for me<\/p>\n<p id=\"rop\"><small>Originally posted 2014-02-08 16:01:43. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I had a fields of Integer type and was trying to add the columns . I was not getting any error when the report is previewed but my java application was failing to compile the report and giving the error as The operator + is undefined for the argument type(s) java.lang.Integer, java.lang.Integer value = (java.lang.Integer)(((java.lang.Integer)field_nBSRptSchm1Col1.getValue())+((java.lang.Integer)field_nBSRptSchm2Col1.getValue())); [&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-2760","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2760","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=2760"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2760\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}