{"id":28573,"date":"2024-02-28T05:46:24","date_gmt":"2024-02-28T05:46:24","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagex3\/?p=28573"},"modified":"2024-11-26T09:53:44","modified_gmt":"2024-11-26T09:53:44","slug":"how-to-set-parameters-for-sql-query-tool-report","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2024\/02\/28\/how-to-set-parameters-for-sql-query-tool-report\/","title":{"rendered":"How to set parameters for SQL Query tool report"},"content":{"rendered":"\n<p>In <a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/sage-x3\/sage-x3-development\/\" rel=\"noreferrer noopener\">Sage X3<\/a>, we may come across a situation where we need to create SQL query tool by adding fields from the table.<\/p>\n\n\n\n<p>There was one requirement from one of our clients to <strong>add parameters (filters) for the SQL query tool in the criteria tab.<\/strong><\/p>\n\n\n\n<p>In this blog, we will explore the process of assigning parameters to the SQL query tool based on client-specific requirements. So, we have added two parameters, <strong>&#8216;From Date&#8217; and &#8216;To Date&#8217;.<\/strong><\/p>\n\n\n\n<p>We will see this functionality in detail in this blog:<\/p>\n\n\n\n<p><strong>Path&gt;&gt;setup&gt;&gt;Usage&gt;&gt;Reports&gt;&gt;SQL query tool<\/strong><\/p>\n\n\n\n<p><strong>New Stuff:<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2024\/02\/27\/how-to-solve-error-x3-trt-subsdhaadx-2612-error-6-variable-non-existent-glbdocdat-in-sage-x3\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2024\/02\/27\/how-to-solve-error-x3-trt-subsdhaadx-2612-error-6-variable-non-existent-glbdocdat-in-sage-x3\/\" rel=\"noreferrer noopener\">How to solve Error: \u201c@X3.TRT\/SUBSDHA$adx (2612) Error 6 : Variable Non-existent GLBDOCDAT\u201d in Sage X3<\/a><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2024\/02\/Create-SQL-query-1024x499.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\/2024\/02\/Create-SQL-query-1024x499.png\" alt=\"Create SQL query\"><\/a><\/center>\n<font size=\"2\"><center>Create SQL query<\/center><\/font>\n\n\n\n<p>Initially, formulate a SQL query in accordance with the client&#8217;s requirements. When incorporating parameters into the SQL query, ensure to enclose the parameter number within %% symbols as shown in the above screen shot.<\/p>\n\n\n\n<p>For Example:<br>select * from SINVOICE where SINVOICE.INVDAT_0 between <strong>%1% and %2%<\/strong><\/p>\n\n\n\n<p><strong>Path &gt;&gt; setup &gt;&gt; Usage &gt;&gt; Reports &gt;&gt; SQL query tool &gt;&gt; Parameter<\/strong><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2024\/02\/Set-Parameter-Description-Datatype-and-Default-Values-1024x517.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\/2024\/02\/Set-Parameter-Description-Datatype-and-Default-Values-1024x517.png\" alt=\"Set Parameter Description, Datatype, and Default Values\"><\/a><\/center>\n<font size=\"2\"><center>Set Parameter Description, Datatype, and Default Values<\/center><\/font>\n\n\n\n<p>Navigate to the Parameters tab and add the necessary parameters, specifying the desired data type. If a default value is needed for a parameter, enter the default value in the &#8216;Default&#8217; column.<\/p>\n\n\n\n<p>We have added <strong>&#8216;Date From&#8217; and &#8216;Date To&#8217;<\/strong> to the Parameter column, assigning a default value using the current <strong>date$<\/strong> function.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2024\/02\/Validate-and-run-query-1024x533.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\/2024\/02\/Validate-and-run-query-1024x533.png\" alt=\"Validate and run query\"><\/a><\/center>\n<font size=\"2\"><center>Validate and run query<\/center><\/font>\n\n\n\n<p>After adding the parameter, click on the \u2018<strong>validate<\/strong>\u2019 button to validate the query, and then click on the &#8216;<strong>Run<\/strong>&#8216; button to execute it.<\/p>\n\n\n\n<p><strong>Path : Path &gt;&gt; setup &gt;&gt; Usage &gt;&gt; Reports &gt;&gt; SQL query tool &gt;&gt; Run button<\/strong><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2024\/02\/Criteria-button-1024x463.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\/2024\/02\/Criteria-button-1024x463.png\" alt=\"Criteria button\"><\/a><\/center>\n<font size=\"2\"><center>Criteria button<\/center><\/font>\n\n\n\n<p>Click on the &#8216;<strong>Criteria<\/strong>&#8216; button.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2024\/02\/Popup-for-Parameters-1024x463.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\/2024\/02\/Popup-for-Parameters-1024x463.png\" alt=\"Popup for Parameters\"><\/a><\/center>\n<font size=\"2\"><center>Popup for Parameters<\/center><\/font>\n\n\n\n<p>So, in conclusion, we have successfully added parameters to this query tool. Now, users can manually enter the required parameters, click on &#8216;Ok,&#8217; and filter the query according to their specific needs, thereby enhancing the flexibility and usability of the report.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>About Us<\/strong><\/h2>\n\n\n\n<p>Greytrix \u2013 a globally recognized and one of the oldest Sage Development Partners is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development, and implementation competence.<\/p>\n\n\n\n<p id=\"block-28013e99-0882-44c6-b705-7b16c85053b2\">Greytrix&nbsp;has some unique integration solutions developed for&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-crm\/\">Sage CRM<\/a>&nbsp;with Sage ERPs&nbsp;namely&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/\">Sage X3<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-intacct\/\">Sage Intacct<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-100-erp\/\">Sage 100<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-500-erp\/\">Sage 500<\/a>,&nbsp;and&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-300-erp\/\">Sage 300<\/a>. We also offer best-in-class&nbsp;Sage ERP&nbsp;and&nbsp;Sage CRM&nbsp;customization and development services&nbsp;to&nbsp;Business&nbsp;Partners,&nbsp;End&nbsp;Users, and Sage PSG worldwide. Greytrix&nbsp;helps in&nbsp;the migration of Sage CRM from&nbsp;Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes&nbsp;addons like&nbsp;&nbsp;Greytrix Business Manager,&nbsp;Sage CRM Project Manager,&nbsp;Sage CRM Resource Planner,&nbsp;Sage CRM Contract Manager,&nbsp;Sage CRM Event Manager,&nbsp;Sage CRM Budget Planner,&nbsp;Gmail Integration,&nbsp;Sage CRM Mobile Service Signature,&nbsp;Sage CRM CTI Framework.<\/p>\n\n\n\n<p id=\"block-4bc42a09-fb13-4598-8137-ce5f7b91ce28\">Greytrix is a recognized&nbsp;Sage Champion Partner&nbsp;for GUMU&#x2122; Sage X3 \u2013 Sage CRM integration listed on&nbsp;<a href=\"https:\/\/www.sage.com\/marketplace\/asb_ListingDetail?listingId=a1h24000007PC3aAAG\" target=\"_blank\" rel=\"noreferrer noopener\">Sage Marketplace<\/a>&nbsp;and Sage CRM \u2013 Sage Intacct integration listed on&nbsp;<a href=\"https:\/\/marketplace.intacct.com\/MPListing?lid=a2D0H000007kiHyUAI\" target=\"_blank\" rel=\"noreferrer noopener\">Sage Intacct Marketplace<\/a>. The&nbsp;<a href=\"https:\/\/www.greytrix.com\/gumu\/\" target=\"_blank\" rel=\"noreferrer noopener\">GUMU&#x2122; Cloud framework<\/a>&nbsp;by Greytrix forms the backbone of cloud integrations that are managed in real-time for the processing and execution of application programs at the click of a button.<\/p>\n\n\n\n<p id=\"block-76376301-1c3e-4250-8a09-727595a606f0\">For more information on our integration solutions, please contact us at&nbsp;<a href=\"mailto:sage@greytrix.com\">sage@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Sage X3, we may come across a situation where we need to create SQL query tool by adding fields from the table. There was one requirement from one of our clients to add parameters (filters) for the SQL query tool in the criteria tab. In this blog, we will explore the process of assigning\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2024\/02\/28\/how-to-set-parameters-for-sql-query-tool-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":[504,1822,4044,4043,4045],"class_list":["post-28573","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","category-integration","tag-date","tag-sage-x3","tag-set-parameters","tag-sql-query-tool","tag-sql-query-tool-report"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/28573","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=28573"}],"version-history":[{"count":9,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/28573\/revisions"}],"predecessor-version":[{"id":30245,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/28573\/revisions\/30245"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=28573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=28573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=28573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}