Launching a report from a button in the SalesLogix web client

As Jason mentioned in his article here, starting in SalesLogix 7.5.1, Sage released an undocumented Reporting enhancement that allowed for interacting with the SalesLogix web reporting Server.  The SalesLogix 7.5.2 release had this API enhancement built in, however little documentation exists and now standard samples are used in the web client.

Hopefully this article will help out those who are trying to figure this out.

The core of the reporting functionality is contained in a standard javascript file “ShowReportUtil.js” that interacts with the built in SalesLogix web reporting functionality.  In order to use any of the functions in the above mentioned java script files you can just add a client click event to a control (like a button), a single line of code like:

 

ShowReportByName(‘Contact:Contact Detail’);

On CLient Click

 

Now lets look at the javascript file.  The file can be found in the Application Architect under Portal Manager…Sage SalesLogix…Support Files…jscript.

ShowReportUtil JS File

If you examine the java script file you can see the various exposed methods available they include:

  • ShowReport(ReportNameOrId, EntityTableName, EntityId) – Shows the report defined by ReportNameOrId using the EntityTableName and EntityId values.
  • ShowReportByName(ReportName) – Displays a report by FAMILY:NAME. The report should be based on the main table associated with the current view.
  • ShowReportById(ReportId) – Displays a report by PLUGIN.PLUGINID. The report should be based on the main table associated with the current view.
  • GetReportId(S) – Returns the PLUGIN.PLUGINID associated with the report defined by the S parameter (In the FAMILY:NAME format).
  • GetCurrentReport() – Returns the report associated with the current view, if any (Outputs in the FAMILY:NAME format).
  • PopulateGlobals(ReportId, EntityTableName, EntityId) – Populates the global report variables used in ShowReport.ascx (in Sage.SalesLogix.Client.Reports.Helper.dll).
  • ShowDefaultReport() –  Displays the default report for the current view and entity, if a report has been associated with the view.  Defaults are defined at the top of the java script file.
ABOUT THE AUTHOR

Kris Halsrud

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

1 Comment

  1. Is this applicable for customize entities? Because when i want to launch customized report in a button it doesn’t show at all.

    Failed to retrieve data from the database. Details: [Database Vendor Code: 30001 ] Failed to retrieve data from the database. Error in File C:WindowsTEMP{3DEFD679-C057-446A-A45A-9675E0CD0378} {973B0EF4-2726-4F9B-AD93-CCE00E8493E2}.rpt: Failed to retrieve data from the database. Details: [Database Vendor Code: 30001 ]

    But it showed in Report navbar..

    Reply

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!