SQL Reporting Services Printing

Back to some technical posts now – this time playing in the land of scripting and installations.

Time came to upgrade our SQL platform from 2008 R2 to 2012…no prizes for guessing why! Oh, maybe a small prize…a mention!

Anyway, I digress. For those of you who use additional bits of SQL – like I do, namely the really useful Reporting Services… this can present an unexpected problem. After your upgrade, all may seem hunky-dory, but then just try printing out one of those reports youve been looking at. In my case, this was some users of PS Financials on our Remote Desktop platform.

ERROR ERROR ERROR ERROR… the print control isnt registered, and will keep mercilessly prompting the user to install it. Now, Im presuming that you dont allow users to install software as they please at this point. So…how to fix it?

Well, thats where some scripting comes in. Now, I cant take full credit for this – but I can confirm that it fixes the issue.


if exist %windir%\SysWOW64\nul goto X64
GOTO X86

:X86
if not exist %windir%\system32\rsver5.txt goto ADD86

GOTO END

:ADD86

regsvr32.exe /u /s %windir%\system32\rsclientprint.dll
copy /Y \\server\share\x86\RSClientPrint.dll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_1028.rll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_1031.rll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_1033.rll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_1036.rll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_1040.rll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_1041.rll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_1042.rll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_1046.rll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_1049.rll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_2052.rll %windir%\system32
copy /Y \\server\share\x86\RSClientPrint_3082.rll %windir%\system32
copy /Y \\server\share\gdiplus.dll %windir%\system32
copy /Y \\server\share\rsver5.txt %windir%\system32
regsvr32.exe /s %windir%\system32\rsclientprint.dll

GOTO FINISH

:X64

if not exist %systemroot%\SysWoW64\rsver5.txt goto ADD64

GOTO END

:ADD64

%systemroot%\SysWoW64\regsvr32.exe /u /s %systemroot%\SysWoW64\rsclientprint64.dll
%systemroot%\SysWoW64\regsvr32.exe /u /s %systemroot%\SysWoW64\rsclientprint.dll

copy /Y \\server\share\64\RSClientPrint64.dll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_1028.rll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_1031.rll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_1033.rll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_1036.rll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_1040.rll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_1041.rll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_1042.rll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_1046.rll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_1049.rll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_2052.rll %systemroot%\SysWoW64
copy /Y \\server\share\64\RSClientPrint64_3082.rll %systemroot%\SysWoW64

copy /Y \\server\share\x86\RSClientPrint.dll %systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_1028.rll %systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_1031.rll %systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_1033.rll %systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_1036.rll%systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_1040.rll %systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_1041.rll %systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_1042.rll %systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_1046.rll %systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_1049.rll %systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_2052.rll %systemroot%\SysWoW64
copy /Y \\server\share\x86\RSClientPrint_3082.rll %systemroot%\SysWoW64

copy /Y \\server\share\gdiplus.dll %systemroot%\SysWoW64
copy /Y \\server\share\rsver5.txt %systemroot%\SysWoW64

%systemroot%\SysWoW64\regsvr32.exe /s %systemroot%\SysWoW64\rsclientprint64.dll
%systemroot%\SysWoW64\regsvr32.exe /s %systemroot%\SysWoW64\rsclientprint.dll

GOTO FINISH

:FINISH

:END

So, whats going on here? First of all, it de-registers the old control, then, after copying the new files in, registers the new files. You can grab the new files from their respective .cab folders on your SQL Reporting Services Server, in the ..\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\RSClientPrint-x##.cab.

If you are a System Centre Configuration Manager user – even better – why not set this up as a task sequence, and get it run on your machines too!

Credit to John Wesley Gordon http://serverfault.com/questions/595373/install-rsclientprint-for-reporting-services-2012-using-bat-file-and-still-be-a

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s