
In the Infor CRM (Saleslogix) Web client, users can go to the Reports section to see the full list of reports that are available. However, some reports, you might not want to have available there. For example, at times, you might build reports that serve a certain purpose, that you run via code from somewhere in the system. If the user runs this report from the reports section, it won’t have the proper context for the purpose the report was built for. Luckily, it is a simple task to exclude reports, or entire report families from the list with a small bit of Javascript code.
In the code sample below, all reports in the “Personal” report family will be excluded from the list of reports:
define([ 'dojo/_base/lang', 'Sage/MainView/ReportMgr/ReportsListPanelConfig' ], function (lang, ReportsListPanelConfig) { lang.extend(ReportsListPanelConfig, { _getWhere: function() { return 'Family ne "Personal"'; } }); });
In the code above, basically, all we are doing is replacing a function in the report list, which normally doesn’t return anything, with one that returns an SData where clause. In this sample, we’re just including the reports with a family that does not equal “Personal”. You could change that to exclude individual reports as well by returning something like 'displayName not in ("My Report Name","My Other Report")'
or even for all reports with a particular base table with 'mainTable ne "MYTABLE"'
.
To wire up this code, you could add it to the report.master or just use our Custom Loader Module and create a folder under SupportFiles\Custom named something like ReportList and add the code to a file there named main.js.
Subscribe To Our Newsletter
Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!
You have Successfully Subscribed!