{"id":26810,"date":"2019-09-11T09:59:12","date_gmt":"2019-09-11T09:59:12","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/?p=26810"},"modified":"2019-11-12T06:21:36","modified_gmt":"2019-11-12T06:21:36","slug":"how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/","title":{"rendered":"How to Print Custom Sage 300 Report using Sage 300 COMAPI in C#"},"content":{"rendered":"\n<p><p style=\"text-align: justify\">In this blog,\nwe are going to see how we can print the custom crystal report using Sage 300 COMAPI\nin C# .Net.<\/p><\/p>\n\n\n\n<p><p style=\"text-align: justify\">This would be a\nuseful to print the custom sage 300 reports from custom user interface.<\/p><\/p>\n\n\n\n<p><p style=\"text-align: justify\">Below are the steps which will guide through how we can print the custom crystal reports.<\/p><\/p>\n\n\n\n<p>New Stuff:- <a rel=\"noreferrer noopener\" aria-label=\"Restrict users from transferring more quantity than the defined quantity in IC Reorder screen (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/08\/30\/restrict-users-from-transferring-more-quantity-than-the-defined-quantity-in-ic-reorder-screen\/\" target=\"_blank\">Restrict users from transferring more quantity than the defined quantity in IC Reorder screen<\/a><\/p>\n\n\n\n<p><strong>Step 1:<\/strong><\/p>\n\n\n\n<p>Include the Sage 300 COMAPI\nDLL in the project.<\/p>\n\n\n\n<p><strong>Step 2:<\/strong><\/p>\n\n\n\n<p>Once the DLL is included, create the\nobject of the AccpacReport and AccpacPrintSetup.<\/p>\n\n\n\n<p>AccpacReport rpt;<\/p>\n\n\n\n<p>AccpacPrintSetup rptPrintSetup;<\/p>\n\n\n\n<p>rpt =\nAccpacCurrentSession.ReportSelect(p_ReportName,&#8221;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;, &#8221;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;);<\/p>\n\n\n\n<p>rptPrintSetup =\nAccpacCurrentSession.GetPrintSetup(&#8221;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n&#8220;, &#8221;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;);<\/p>\n\n\n\n<p><strong>Step 3:<\/strong><\/p>\n\n\n\n<p>Now we will set the parameters of custom report.<\/p>\n\n\n\n<p>rpt.SetParam(p_strParameterName,\np_strParameterValues);<\/p>\n\n\n\n<p><strong>Step 4:<\/strong><\/p>\n\n\n\n<p>Now we will assign a value to \u201cNumOfCopies\u201d,\n\u201cDestination\u201d, \u201cPrintDir\u201d properties.<\/p>\n\n\n\n<p>rpt.NumOfCopies = 1;<\/p>\n\n\n\n<p>rpt.Destination =\nrptPrintSetup.Destination;<\/p>\n\n\n\n<p>rpt.PrintDir = &#8220;&#8221;;<\/p>\n\n\n\n<p><strong>Step 5:<\/strong><\/p>\n\n\n\n<p>Now we print the Report.<\/p>\n\n\n\n<p>rpt.PrintReport();<\/p>\n\n\n\n<p>So using this code we can print the custom Sage 300 crystal report using Sage 300 COMAPI.<\/p>\n\n\n\n<p>About Us:-<\/p>\n\n\n\n<p><p style=\"text-align: justify\"><a href=\"https:\/\/www.greytrix.com\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Greytrix<\/a> a globally recognized Premier Sage Gold Development Partner is a one stop solution provider for Sage ERP and Sage CRM needs. Being recognized and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation expertise.<\/p><\/p>\n\n\n\n<p><p style=\"text-align: justify\"><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/\" target=\"_blank\">Greytrix<\/a> offers unique GUMU&#x2122; integrated solutions of&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-300-erp-integration\">Sage 300 with Sage CRM,<\/a>&nbsp;<a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp\/gumu-300-salesforce-integration\" target=\"_blank\">Salesforce.com&nbsp;<\/a>and&nbsp;<a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp\/ecommerce-magento-integration\" target=\"_blank\">Magento eCommerce<\/a> along with Sage 300 Migration from <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/resources\/sage-erp-crm-migration.pdf\" target=\"_blank\">Sage 50 US, Sage 50 CA, Sage PRO, QuickBooks, Sage Business Vision and Sage Business Works<\/a>. We also offer best-in-class&nbsp;<a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-300-erp-development\" target=\"_blank\">Sage 300 customization and development services<\/a>&nbsp;and integration service for applications such as <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-300-integration-services\" target=\"_blank\">POS | WMS | Payroll | Shipping System | Business Intelligence | eCommerce for Sage 300 ERP<\/a> and in Sage 300c development services we offer services such as upgrades of older codes and screens to new web screens, newer integrations using sdata and web services &nbsp;to Sage business partners, end users and Sage PSG worldwide. Greytrix offers over 20+ Sage 300 productivity enhancing utilities that we can help you with such as <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/greymatrix-apparel-solution\" target=\"_blank\">GreyMatrix<\/a>, <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/greytrix-document-attachement\" target=\"_blank\">Document Attachment<\/a>, <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/greytrix-document-numbering\" target=\"_blank\">Document Numbering<\/a>, <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/auto-bank-reconciliation\" target=\"_blank\">Auto-Bank Reconciliation<\/a>, <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/purchase-approval-system\" target=\"_blank\">Purchase Approval System<\/a>, <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/three-way-po-matching\" target=\"_blank\">Three way PO matching<\/a>, <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/bill-of-lading\" target=\"_blank\">Bill of Lading<\/a> and <a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/vat-middle-east\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">VAT for Middle East<\/a>.<\/p><\/p>\n\n\n\n<p><p style=\"text-align: justify\">For more details on Sage 300 and 300c Services, please contact us at&nbsp;<a href=\"mailto:accpac@greytrix.com\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">accpac@greytrix.com<\/a>. We will be glad to assist you.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, we are going to see how we can print the custom crystal report using Sage 300 COMAPI in C# .Net. This would be a useful to print the custom sage 300 reports from custom user interface. Below are the steps which will guide through how we can print the custom crystal reports.\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/\">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":[2],"tags":[3309,3308,2357],"class_list":["post-26810","post","type-post","status-publish","format-standard","hentry","category-sage-accpac","tag-crystal-report-from-comapi-print-custom-crystal-report-custom-crystal-report","tag-sage-300-crystal-report","tag-sage-300-erp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Print Custom Sage 300 Report using Sage 300 COMAPI in C# - Sage 300 ERP \u2013 Tips, Tricks and Components<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Print Custom Sage 300 Report using Sage 300 COMAPI in C# - Sage 300 ERP \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"og:description\" content=\"In this blog, we are going to see how we can print the custom crystal report using Sage 300 COMAPI in C# .Net. This would be a useful to print the custom sage 300 reports from custom user interface. Below are the steps which will guide through how we can print the custom crystal reports.\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage 300 ERP \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-11T09:59:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-11-12T06:21:36+00:00\" \/>\n<meta name=\"author\" content=\"Greytrix\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Greytrix\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/\",\"name\":\"How to Print Custom Sage 300 Report using Sage 300 COMAPI in C# - Sage 300 ERP \u2013 Tips, Tricks and Components\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website\"},\"datePublished\":\"2019-09-11T09:59:12+00:00\",\"dateModified\":\"2019-11-12T06:21:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/93977cd8aa8fbd1f151d3f664e29c9f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Print Custom Sage 300 Report using Sage 300 COMAPI in C#\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/\",\"name\":\"Sage 300 ERP \u2013 Tips, Tricks and Components\",\"description\":\"Explore the world of Sage 300 with our insightful blogs, expert tips, and the latest updates. We\u2019ll empower you to leverage Sage 300 to its fullest potential. As your one-stop partner, Greytrix delivers exceptional solutions and integrations for Sage 300. Our blogs extend our support to businesses, covering the latest insights and trends. Dive in and transform your Sage 300 experience with us! \",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/93977cd8aa8fbd1f151d3f664e29c9f2\",\"name\":\"Greytrix\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g\",\"caption\":\"Greytrix\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/author\/greytrix\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Print Custom Sage 300 Report using Sage 300 COMAPI in C# - Sage 300 ERP \u2013 Tips, Tricks and Components","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/","og_locale":"en_US","og_type":"article","og_title":"How to Print Custom Sage 300 Report using Sage 300 COMAPI in C# - Sage 300 ERP \u2013 Tips, Tricks and Components","og_description":"In this blog, we are going to see how we can print the custom crystal report using Sage 300 COMAPI in C# .Net. This would be a useful to print the custom sage 300 reports from custom user interface. Below are the steps which will guide through how we can print the custom crystal reports.\u2026 Read More &raquo;","og_url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/","og_site_name":"Sage 300 ERP \u2013 Tips, Tricks and Components","article_published_time":"2019-09-11T09:59:12+00:00","article_modified_time":"2019-11-12T06:21:36+00:00","author":"Greytrix","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Greytrix","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/","url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/","name":"How to Print Custom Sage 300 Report using Sage 300 COMAPI in C# - Sage 300 ERP \u2013 Tips, Tricks and Components","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website"},"datePublished":"2019-09-11T09:59:12+00:00","dateModified":"2019-11-12T06:21:36+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/93977cd8aa8fbd1f151d3f664e29c9f2"},"breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2019\/09\/11\/how-to-print-custom-sage-300-report-using-sage-300-comapi-in-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/"},{"@type":"ListItem","position":2,"name":"How to Print Custom Sage 300 Report using Sage 300 COMAPI in C#"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/","name":"Sage 300 ERP \u2013 Tips, Tricks and Components","description":"Explore the world of Sage 300 with our insightful blogs, expert tips, and the latest updates. We\u2019ll empower you to leverage Sage 300 to its fullest potential. As your one-stop partner, Greytrix delivers exceptional solutions and integrations for Sage 300. Our blogs extend our support to businesses, covering the latest insights and trends. Dive in and transform your Sage 300 experience with us! ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/93977cd8aa8fbd1f151d3f664e29c9f2","name":"Greytrix","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g","caption":"Greytrix"},"url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/author\/greytrix\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts\/26810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/comments?post=26810"}],"version-history":[{"count":1,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts\/26810\/revisions"}],"predecessor-version":[{"id":26816,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts\/26810\/revisions\/26816"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/media?parent=26810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/categories?post=26810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/tags?post=26810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}