Advertisement
RyanFarley

Limit Export Choices for Reports in Infor CRM

Sep 28th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.     require(['dojo/_base/lang', 'Sage/Reporting/Enumerations', 'Sage/MainView/ReportMgr/ReportManagerUtility'], function(lang, Enumerations, ReportManagerUtility) {
  3.         lang.mixin(ReportManagerUtility, {
  4.             getOutputFormats: function (reportType) {
  5.                 switch (reportType) {
  6.                     case Enumerations.ReportTypes.CrystalReport:
  7.                         return [
  8.                             {
  9.                                 outputFormat: Enumerations.ReportExportFormat.Pdf,
  10.                                 caption: Enumerations.nlsResources.txtPdf
  11.                             },
  12.                             {
  13.                                 outputFormat: Enumerations.ReportExportFormat.Word,
  14.                                 caption: Enumerations.nlsResources.txtWord
  15.                             },
  16.                             {
  17.                                 outputFormat: Enumerations.ReportExportFormat.ExcelDataOnly,
  18.                                 caption: Enumerations.nlsResources.txtExcelDataOnly
  19.                             }
  20.                         ];
  21.                     default:
  22.                         console.error("Unsupported report type: " + reportType);
  23.                         return [];
  24.                 }
  25.             }
  26.         });
  27.     });
  28. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement