When I implement a new client I typically leave them on during training with an instruction to identify which ones they want to use after go-live as I will switch off any I’m not told to leave on.
I used to do it the other way and tell people to let me know which ones they wanted switched off; however, this lead to all reports being left on and then it being mentioned a year or so down the line that they get all these reports printing that they don’t want.
So now, all get switched off unless I am specifically told to leave them on. As I’ve dealt with clients with many companies (I think the largest is 180 companies) this is not something I want to do manually.
Fortunately, the settings for whether the reports should print is stored in SQL table which means a SQL script can be written to switch them off in bulk.
The following script will use the Company MSTR table to get all companies in the sysem database and loop through all of them and switch off all reports except for the PM EFT Payment Register in all companies:
DECLARE @SQL_Statement VARCHAR(1000)
SELECT INTERID FROM DYNAMICS..SY01500
DECLARE @INTERID VARCHAR(100)
FETCH NEXT FROM
While (@@FETCH_STATUS <> -1)
IF (@@FETCH_STATUS <> -2)
SET @SQL_Statement = 'UPDATE ' + RTRIM(@INTERID) + '.dbo.SY02200 SET PRNTJRNL = 0 WHERE PRNTJRNL <> 0 AND PTGRPTNM <> ''EFT Payment Register'''
FETCH NEXT FROM
As always when running an SQL script, check to make sure you’re happy with what the script is going to do and ensure you have a good backup before you run the script in case of problems.