Running a Report from a Button in the Saleslogix Web Client v8.1

Here is a quick rundown of how to invoke a report for the current record in the various levels of SLX.

In 7.54

btnPreview.OnClientClick = "ShowReportByName('Sales Order:SalesOrder Detail'); return false;";

In 8.0

btnPreview.OnClientClick = @"require(['Sage/Reporting/Service'], function (Service) {
var oReporting = Sage.Services.getService('ReportingService');
oReporting.showReportByName('Sales Order:SalesOrder Detail'); return false;});";

In 8.1

btnPreview.OnClientClick = @"var oReporting = Sage.Services.getService('ReportingService');
oReporting.showReport('Sales Order:SalesOrder Detail', 'SALESORDER', Sage.Utility.getCurrentEntityId());
return false;";

Please note that somewhere along the way I think the family that reports are saved in my have changed from SalesOrder to Sales Order.  Those parts of the code are shown in bold. Si if one doesnt work try with or without the space.



Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.


  1. It doesn’t appear that the client side reporting service exposes the ability to save the report as an attachment, at least from what I can tell. (wwwrootSlxClientjscriptSageServicesReportingService.js). Not sure the best way to make that happen.

    • Know this is an old-er blog post, but did you ever figure out how to save the report as an attachment? I’m currently trying to do this with a custom Quote report. The attachment save looks successful when you execute the OOTB Generate Proposal report, but not for my custom one. I’ve even tried the reporting service startWizard() call, but still no attachment.

    • Jim I never did look into saving it as an attachment. The client side library only offers the ability to run the report and download it but not just save it as an attachment.

  2. I tried to get this to work on v8.3, and found that I needed to make a few changes.
    I added this JavaScript code below, to the On Client Click event for a button on the Sales Order details page.

    if (Sage.Services.hasService(“ReportingService”)){
    var oReportingService = Sage.Services.getService(“ReportingService”);
    if (oReportingService) {
    oReportingService.showReport(‘Sales Order:Sales Order Detail’, ‘SALESORDER’, Sage.Utility.getCurrentEntityId());

  3. Hello,

    Is there any possibility to set the document format we want?
    Word, PDF…



  4. Hello! is posible print the file from java? Or get the link of the file to a variable?


Submit a Comment

Your email address will not be published. Required fields are marked *

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!