A report of its own report history?
-
Like with the online playground, I have Jsreport running on a server in my local network with an Enterprise license. Several users access it to run various pre-built reports. I'd like to build a Jsreport in which the data is itself -- its report history.
The purpose is to have this report emailed to me (using "afterRender" in the report's script) on a schedule showing which reports have been run by Template Name and when. I'd like to be able to group the output by Template Name to see which reports are used regularly and which reports have not been used at all.
I was originally thinking of having a "beforeRender" script function retrieve the data using a third-party OData client and connecting to itself, but that seemed roundabout and complicated to me. I figured I'd ask.
Is there a better or recommended way to access Jsreport's own report history, from which I can group the history by Template Name and email a PDF or XLSX report? (For clarity, I know how to email the report within "afterRender." I'm seeking guidance on how to retrieve Jsreport's own history within "beforeRender" -- unless anyone has an alternative suggestion.)