Ad Hoc Reports, Archived versions of query

Ad Hoc Reports, Archived versions of query

Robert Wagenhoffer -
回帖数:5
Hello,

I use Ad Hoc Reports frequently and it works great.   In many cases I use scheduled asks and the number of archived reports is getting very long.  Does anyone know how to delete these or set a limit on how many are stored before being overwritten?

Thank you in advance...
回复Robert Wagenhoffer

Re: Ad Hoc Reports, Archived versions of query

Ken Task -
Particularly helpful Moodlers的头像
Am not an SQL 'ace' but think you need to look into LIMIT and OFFSET in your queries.

This might help:

I briefly looked through/searched shared queries 


and didn't find any with LIMIT and OFFSET ... did find some with LIMIT.

Also ... we are in Hardware and Performance?
Nest time, a better place might be:

'SoS', Ken

回复Robert Wagenhoffer

Re: Ad Hoc Reports, Archived versions of query

Ken Task -
Particularly helpful Moodlers的头像
Ok, I may have mis-understood ...
In version 4.3 there is a Report Builder.

At the bottom of the link above:

Custom report settings

From Site administration > Reports > Report builder, this page allows the admin to:

  • limit the number of custom reports.
  • disable live editing.

Both these actions will then have a beneficial effect on performance, if required.

Maybe the first bulleted item is what you seek.

'SoS', Ken

回复Robert Wagenhoffer

Re: Ad Hoc Reports, Archived versions of query

Tim Hunt -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
At the moment, there is no way to limit this. the only reports just accumulate.

Having a configurable limit would be a sensible feature, at least it seem logical, but we have never really needed it, so we have never got around to implementing it ourselves.
回复Tim Hunt

Re: Ad Hoc Reports, Archived versions of query

Robert Wagenhoffer -
Thank you Tim for clarifying this. I am not able to code this feature myself, but agree it would be nice. I've been accumulating reports that run daily for two years now.
回复Robert Wagenhoffer

Re: Ad Hoc Reports, Archived versions of query

Tim Hunt -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
The reports are just stored in the 'moodledata' folder on the server, inside the admin_report_customsql folder there, and the filenames used are pretty obvious (if you know the report id, which you can get from the URL when looking at the report.) So, if you have direct access to the server, you can just go in and delete the files.