Viewing Previously Run Reports in Infor CRM Web

When you run a report in the Infor CRM Web client, the request it passed to the job server, which runs the report and saves it as a PDF. This PDF is saved in the attachment folder defined for CRM and it also creates a record in the attachment table. This information can be used to view previously run reports in CRM, who ran them, and even view the output of the file at the time it was run.

To View Previously Run Reports

You can use the following query to see the previously run reports as well as where the saved PDF files are located:

select
      reporthistory.pluginname as Report 
    , reporthistory.pluginfamily as ReportFamily 
    , reporthistory.createdate as RunDate 
    , userinfo.username as RunBy 
    , (
          select
              top 1 attachmentpath  
          from
              sysdba.branchoptions 
          where
              sitecode = (select primaryserver from sysdba.systeminfo where systeminfoid = 'PRIMARY')
      ) + '\' + attachment.filename as SavedFile 
from 
    sysdba.reporthistory 

    inner join sysdba.attachment 
    on reporthistory.attachid = attachment.attachid 
 
    left join sysdba.userinfo 
    on reporthistory.userid = userinfo.userid 
order by
    reporthistory.createdate desc

The results of this query will show you the following:

  1. The report that was run
  2. The date it was run
  3. Who ran the report
  4. Where you can find the PDF output of that report in the attachment folder

Note: To view this in the client, the report area does have a built-in report “History” group where you can see, and download, previously run reports as well. This data can be obtained via SData using the endpoint: /sdata/slx/dynamic/-/reportHistory

Keep in mind, this only applies to report run in the web client, not the LAN client (since the LAN client doesn’t use the job server to run reports).

ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix since 2001 and believes in sharing with the community. He loves C#, Javascript, Python, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

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) news and product updates!

You have Successfully Subscribed!