{"id":26632,"date":"2023-05-30T09:59:13","date_gmt":"2023-05-30T09:59:13","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagex3\/?p=26632"},"modified":"2024-11-26T08:39:11","modified_gmt":"2024-11-26T08:39:11","slug":"how-to-conditionally-format-fields-using-the-highlighting-expert-in-crystal-report","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2023\/05\/30\/how-to-conditionally-format-fields-using-the-highlighting-expert-in-crystal-report\/","title":{"rendered":"How to conditionally format fields using the Highlighting Expert in Crystal Report"},"content":{"rendered":"\n<p>In the <a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/\" target=\"_blank\" data-type=\"URL\" data-id=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\" rel=\"noreferrer noopener\">Sage X3<\/a>, we have various standard reports for almost every screen which are developed in Crystal Report. Also we can develop customized reports as per client\u2018s need. Crystal Reports is a popular Windows-based report writer solution that allows a developer to create reports and dashboards from a variety of data sources with a minimum of code to write.<\/p>\n\n\n\n<p>One of our client wanted to highlight the lines in the Sales Order report which are having values greater than 10,000. To achieve this requirement, we have used <strong>Highlighting Expert<\/strong> feature of Crystal Report, which highlights one or more fields or the whole section based on a particular condition. <\/p>\n\n\n\n<p>We&#8217;ve created a DEMO report and highlighted the field &#8216;Total&#8217; with red color and the whole section with silver when the &#8216;total including tax&#8217; field exceeds the value greater than or equal to<br>10,000. Follow the below steps to achive above task :<\/p>\n\n\n\n<p><strong>Step 1:<\/strong><br>Select a field to be highlighted (Total Including Tax)<\/p>\n\n\n\n<p><strong>Step 2:<br><\/strong>Highlighting button on the Expert Tools toolbar<\/p>\n\n\n\n<p><strong>New Stuff:<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2023\/05\/30\/how-to-increase-or-decrease-the-number-of-lines-in-grid-of-any-inquiry-screen\/\" target=\"_blank\" data-type=\"URL\" data-id=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2023\/05\/30\/how-to-increase-or-decrease-the-number-of-lines-in-grid-of-any-inquiry-screen\/\" rel=\"noreferrer noopener\">How to increase or decrease the number of lines in grid of any Inquiry screen<\/a><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/05\/highlighting.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/05\/highlighting.jpg\" alt=\"Expert Tools toolbar\"><\/a><\/center>\n<font size=\"2\"><center>Expert Tools toolbar<\/center><\/font>\n\n\n\n<p><strong>Step 3:<\/strong><br>In the Item editor area, click the Value of list and select the field that you want to base your condition on.<br>The field chosen here is the field upon which your condition is based; this field need not be the field that is being formatted. To create a condition based on the values of the field that is being formatted, select &#8220;this field&#8221; from the list. To base your condition on a different report field, select it from the list of available fields.<\/p>\n\n\n\n<p><strong>Step 4:<\/strong><br>Select a comparison from the second list (is equal to, is less than, and so on).<\/p>\n\n\n\n<p><strong>Step 5:<\/strong><br>Complete the condition by entering the desired value in the box.<\/p>\n\n\n\n<p><strong>Step 6:<\/strong><br>In the Font style, Font color, Background, and Border lists, specify the formatting changes that you want to apply to the selected field when your condition is met.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/05\/highlight-expert.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/05\/highlight-expert.jpg\" alt=\"Highlight expert\"><\/a><\/center>\n<font size=\"2\"><center>Highlight expert<\/center><\/font>\n\n\n\n<p><strong>Step 7:<\/strong><br>Click OK to return to your report.<\/p>\n\n\n\n<p>Also, we can change the backgroud color based on conditions of any particular section by writing the condition on formula workshop :<\/p>\n\n\n\n<p><strong>Step 1:<\/strong><br>Right Click on the detail section and select &#8216;Color&#8217; tab.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/05\/section-expert.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/05\/section-expert.png\" alt=\"Section Expert\"><\/a><\/center>\n<font size=\"2\"><center>Section Expert<\/center><\/font>\n\n\n\n<p><strong>Step 2:<\/strong><br>Click on the conditional formula button and write the condition as per requirement<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/05\/Formula-Workshop.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/05\/Formula-Workshop.png\" alt=\"Formula Workshop\"><\/a><\/center>\n<font size=\"2\"><center>Formula Workshop<\/center><\/font>\n\n\n\n<p><strong>Step 3:<\/strong><br>Click on save and close button.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/05\/Output.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/05\/Output.png\" alt=\"Output\"><\/a><\/center>\n<font size=\"2\"><center>Output<\/center><\/font>\n\n\n\n<p>As we can see, lines which are having values greater than 10,000 in Total Excluding Tax are getting highlighted in Red color and having background of Grey color. But the other remaining values are not getting highlighted and background color for those values is white.<\/p>\n\n\n\n<p>So it is working properly as per the condition we have applied in the Formula workshop and Highlighting expert.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Sage X3, we have various standard reports for almost every screen which are developed in Crystal Report. Also we can develop customized reports as per client\u2018s need. Crystal Reports is a popular Windows-based report writer solution that allows a developer to create reports and dashboards from a variety of data sources with a\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2023\/05\/30\/how-to-conditionally-format-fields-using-the-highlighting-expert-in-crystal-report\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,13],"tags":[3172,357,3699,461,3517,3739,3745],"class_list":["post-26632","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","category-integration","tag-amount","tag-color","tag-conditions","tag-crystal-report","tag-formula","tag-greater-than","tag-highlighting"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/26632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=26632"}],"version-history":[{"count":13,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/26632\/revisions"}],"predecessor-version":[{"id":30235,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/26632\/revisions\/30235"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=26632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=26632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=26632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}