{"id":630,"date":"2010-05-03T15:12:42","date_gmt":"2010-05-03T09:42:42","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=630"},"modified":"2010-06-09T16:05:38","modified_gmt":"2010-06-09T10:35:38","slug":"jasper-report-pattern-for-negative-numbers","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/jasper-report-pattern-for-negative-numbers\/","title":{"rendered":"Jasper report  &#8211; Pattern for Negative Numbers"},"content":{"rendered":"<p>Recently had a requirement to print Currency values with a condition that negative numbers must be inside brackets.<\/p>\n<p>It  can be done by  using pattern property in  <textField> tag.<\/p>\n<pre lang=\"groovy\">\r\n<textField pattern=\"#,#0;(#,##0)\" > \r\n<\/pre>\n<p>the part before semicolon is for positive numbers and  part following semicolon is for negative number. <\/p>\n<p>____________________<br \/>\nHitesh<br \/>\nhitesh@intelligrape.com<br \/>\nIntelligrape Software<br \/>\n____________________<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently had a requirement to print Currency values with a condition that negative numbers must be inside brackets. It can be done by using pattern property in tag. the part before semicolon is for positive numbers and part following semicolon is for negative number. ____________________ Hitesh hitesh@intelligrape.com Intelligrape Software ____________________<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":14},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/630"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=630"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/630\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}