{"id":30587,"date":"2025-01-30T09:23:26","date_gmt":"2025-01-30T09:23:26","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagex3\/?p=30587"},"modified":"2025-01-30T09:23:26","modified_gmt":"2025-01-30T09:23:26","slug":"how-to-print-comments-data-longer-than-250-characters-on-crystal-reports-at-once-in-sage-x3","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/01\/30\/how-to-print-comments-data-longer-than-250-characters-on-crystal-reports-at-once-in-sage-x3\/","title":{"rendered":"How to print comments data longer than 250 characters on Crystal Reports at once in Sage X3"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/development-services\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/sage-x3-erp\/development-services\/\" rel=\"noreferrer noopener\">Sage X3<\/a> is enterprise resource planning (ERP) product which help organization to manage all the operation of organization and database into a single software solution. Sage X3 contains list of modules like sales, purchase, inventory, project, financial and many more.<\/p>\n\n\n\n<p>At times, users encounter an issue where they input comments in the comment section exceeding 250 characters, but the full value does not get printed in the report because Crystal Reports only accepts 250 characters for the RTF text<\/p>\n\n\n\n<p>We have taken a sales invoice screen as an example, where a user entered comments, as shown in the picture below<\/p>\n\n\n\n<p>New Stuff: <a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/01\/30\/fixing-date-defaults-date-field-default-year-1930-instead-of-2030\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/01\/30\/fixing-date-defaults-date-field-default-year-1930-instead-of-2030\/\" rel=\"noreferrer noopener\">Fixing Date Defaults: Date field default year 1930 Instead of 2030<\/a><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/01\/Fig01-Sales-invoice-screen-1024x597.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/01\/Fig01-Sales-invoice-screen-1024x597.png\" alt=\"Fig01 : Sales invoice screen\"><\/a><\/center>\n<font size=\"2\"><center>Fig01 : Sales invoice screen<\/center><\/font>\n\n\n\n<p>The output is as shown in the below picture :<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/01\/Fig02-Sales-invoice-report.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/01\/Fig02-Sales-invoice-report.png\" alt=\"Fig02 : Sales invoice report\"><\/a><\/center>\n<font size=\"2\"><center>Fig02 : Sales invoice report<\/center><\/font>\n\n\n\n<p>To overcome this issue, we have found a solution that allows the full data present on the screen to be printed in the reports as well<\/p>\n\n\n\n<p>To print the full comment data in the report, there is no built-in function in Crystal Reports to fulfill this requirement. Therefore, we created a new query-based sub-report where we used the SUBSTRING and REPLACE functions, as shown in the picture below. The CLOB_0 field in the ACLOB table contains the comment data in RTF text format. We replaced the spaces (\u201c \u201d) with tildes (\u201c~\u201d) and used the SUBSTRING function to trim the string into 250-character segments.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/01\/Fig03-Subrepoort-SQL-query.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/01\/Fig03-Subrepoort-SQL-query.png\" alt=\"Fig03 : Sub report SQL query\"><\/a><\/center>\n<font size=\"2\"><center>Fig03 : Sub report SQL query<\/center><\/font>\n\n\n\n<p>Additionally, in Crystal Reports, we created a formula and placed it in the report to replace the tildes (\u201c~\u201d) with spaces (\u201c \u201d) and sum all the command fields used in the SQL query, as shown in the picture below:<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/01\/Fig04-Subreport-Formula.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/01\/Fig04-Subreport-Formula.png\" alt=\"Fig04 : Sub report Formula\"><\/a><\/center>\n<font size=\"2\"><center>Fig04 : Sub report Formula<\/center><\/font>\n\n\n\n<p>After completing all the steps, we get an output where the comments are the same as those entered in the Sales Invoice screen&#8217;s comments field as shown in the below picture :<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/01\/Fig05-Sales-invoice-report.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/01\/Fig05-Sales-invoice-report.png\" alt=\"Fig05 : Sales invoice report\"><\/a><\/center>\n<font size=\"2\"><center>Fig05 : Sales invoice report<\/center><\/font>\n\n\n\n<p>By following the above steps, we can print comments data longer than 250 characters on Crystal Reports at once in Sage X3.<\/p>\n\n\n[about_us_blog_common]\n","protected":false},"excerpt":{"rendered":"<p>Sage X3 is enterprise resource planning (ERP) product which help organization to manage all the operation of organization and database into a single software solution. Sage X3 contains list of modules like sales, purchase, inventory, project, financial and many more. At times, users encounter an issue where they input comments in the comment section exceeding\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/01\/30\/how-to-print-comments-data-longer-than-250-characters-on-crystal-reports-at-once-in-sage-x3\/\">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":[3747,461,3265,2538,3036],"class_list":["post-30587","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","category-integration","tag-comments","tag-crystal-report","tag-sagex3","tag-sales-invoice","tag-subreport"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/30587","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=30587"}],"version-history":[{"count":11,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/30587\/revisions"}],"predecessor-version":[{"id":30626,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/30587\/revisions\/30626"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=30587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=30587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=30587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}