Each time a report is run within Agresso it produces a log file and a report results file. These files are stored on the Agresso Application server in the “Server Logging” folder and “Report Results” folder respectively. They are also stored in the database in a table called ACRPRINTBLOB. When a report or log file is viewed from “Maintenance of ordered reports” within the Agresso desktop client, the files are retrieved from the database.
Naturally the default setting within Agresso is to maintain these files on a permanent basis. There are however very good routines within Agresso that will allow you to clear them down. Please note however, before applying any of the following clean up routines, some organisations do want to keep these indefinitely and this may be for auditing purposes for example. However when auditing purposes as been cited for a reason for keeping reports, it is usually only a very small number of report types that fall into this category.
There are two methods within Agresso for implementing the clean up routines. The first one is configured within the Agresso Management Console and allows you to specify that you would like to keep the file for a certain number of days. Or alternatively that you would like to keep a particular number of each type of report. These settings apply to both report result files and server logging files.
The above settings keep all report result and server logging files for 15 days. The settings will also delete the files from the Agresso Application server which are in “Server Logging” and “Report Results”.
In the above screenshot, the “Mode” option which shows “Number of days” is a drop down list. As discussed, the other option available is to keep “Number of Report Orders”.
If you find you do have 10’s of Gigabytes of data in the ACRPRINTBLOB table, then it may be worth setting the value to a higher figure than 15 days and gradually reducing it down to the value you want. This will just avoid a DELETE statement removing a huge amount of data in a single transaction which could cause the transaction log to grow a lot.
If you are in a situation where you would like to keep one or two specific types of report results files because they are perhaps a point in time snapshot of values. Then it is possible to remove files on a more granular level. This cannot be done in the above setup though, you need to use the AG57 report which is run from within the Agresso Desktop Client.
This report accepts parameters for types of particular reports or specific reports. So if you have scheduled a PO01 report to run every 5 minutes and would like to clear down all of the PO01 reports, then the AG57 can be setup and scheduled to do this. Or you could just remove all of the PO reports.
The Ag57 allows a much more granular approach to removing unwanted files, but will take longer to setup than the global approach that is done within the AMC as obviously you would need to schedule one report for each set of report modules that you wanted to remove.
A common question that we are asked is that if the ACRPRINTBLOB table is over 50% the size of the total database. Will clearing it down make the Agresso Client run twice as fast? Afraid the answer to that would be No. It would however dramatically reduce the size of your database backups and this is particularly true when you are using SQL Server compressed backups. The Image files are already compressed when they are stored in the database, so the backup compression has minimal effect on them.
The other advantage of clearing down unwanted report result and log files is that finding log files in the “Server Logging” folder is now manageable. Faster backup and restore times of the database and reduced backup sizes also provide many advantages both in terms of cost and manageability.
If you are experiencing problems with having massive amounts of files in the “Server Logging” and “Report Results “directories, but are unable to implement either of the above two procedures. Then as a workaround we would recommend scheduling a PowerShell script to archive the files from the directories and move them into a ZIP or RAR file. We have implemented this before where once a month the job would run and move files older than a month to a compressed file. So on the 1st of June the job would move all of the files with a timestamp of April into a single compressed file and so on.
For further information on using Powershell to delete or archive files…