One of this week's many Salesforce challenges was to clear out 2,000+ old reports from a client's ORG which were not longer required and were just taking up space. None of the reports had been run in over a year and were seriously cluttering up the place.
It turns out that there are multiple ways of accomplishing this so I thought I'd write up the various options.
In preparation for the clear out I avidly followed the tips given on the following blog posting.
and this one:
In short the approach was to
- communicate to users what you are doing with old reports,
- send a targeted email to all users who have reports that had not been run in a year
- move those reports into a folder called "Reports to be deleted"
- then, find the best way of deleting them
So many options
Having moved all of my reports into a single folder I thought all of the hard work was done. However, actually clearing them out proved to be trickier than I thought. I'll run through the options I tried below.
1. Individually delete the reports
Hover your mouse over each report and delete manually. Good for smaller numbers of reports but this approach would take a very long time to delete a large number of reports.
2. Using Eclipse IDE
There were several blog postings outlining how you could use Eclipse to delete reports.
The steps outlined were:
- log into Eclipse (I am using Kepler edition)
- download the report folder you want to delete
- delete the folder within Eclipse
- then select "deploy to server" to synchronise your changes back in your live ORG
- Once the deploy process is complete the folder should no longer be visible in your Salesforce ORG.
I tried individually deleting reports in Eclipse and also deleting a whole folder of reports but after deploying to server I could still see the reports and report folder in Salesforce.
Strangely though, when I went to open any of the reports in that folder I would just get a blank page. When I refreshed the page the report would then actually disappear. This could have just been a bug with my Eclipse installation but that, and the fact that each deploy process took a good 15 - 20 minutes to complete, meant that I still had many more reports that needed removing.
Here are a couple of links to forums discussing Eclipse IDE and Report deletion in more detail.