Thursday, 9 February 2017

Deletion of SSRS Report from Report Manager

Hi Folks!!!

I am back with yet another interesting and fascinating topic.


Sometime we came across tedious but important job of deletion of obsolete report from Report Manager though it is very helpful mainly for management and for some extents to developer as well.


But in fact, aforementioned task is very cumbersome if we delete each and every report via traditional way (manually deleting from report manager one by one).


One of the handful method is deleting report with the help of RSS file, herein i am describing the steps to perform the activities.


Step 1 - Create .RSS file, for example TestDelete.rss and placed at any location where you are comfortable.




Step 2 - Use VB script and write above mention code in RSS file.


Note - /Report_Test/TestReport  - Root folder in Report Manager i.e. in this case, we have folder Report_test at root on Report Manager and testReport is rdl file inside it.


Step 3 - With the help of CMD command, we can delete above mention report, CMD as below




This will delete test report from report manager.


You might be thinking, aforementioned process will only delete one report at a time, and yes, you are correct, but a little tweaking in script will delete multiple report at one go.


Just have to include rs.DeleteItem row in script equivalent to number of report to be deleted.


How to proceed

Task - To delete multiple reports

Steps -


1. Introduce rs.DeleteItem row with required reports in RSS file

2. Execute same CMD command as above



Output - Both reports are deleted.



There are many more methods to delete reports dynamically, i found this one is good.



Author - Feel free to ask if you have any query.

No comments: