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%SysWOW64nul goto X64
GOTO X86

:X86
if not exist %windir%system32rsver5.txt goto ADD86

GOTO END

:ADD86

regsvr32.exe /u /s %windir%system32rsclientprint.dll
copy /Y \serversharex86RSClientPrint.dll %windir%system32
copy /Y \serversharex86RSClientPrint_1028.rll %windir%system32
copy /Y \serversharex86RSClientPrint_1031.rll %windir%system32
copy /Y \serversharex86RSClientPrint_1033.rll %windir%system32
copy /Y \serversharex86RSClientPrint_1036.rll %windir%system32
copy /Y \serversharex86RSClientPrint_1040.rll %windir%system32
copy /Y \serversharex86RSClientPrint_1041.rll %windir%system32
copy /Y \serversharex86RSClientPrint_1042.rll %windir%system32
copy /Y \serversharex86RSClientPrint_1046.rll %windir%system32
copy /Y \serversharex86RSClientPrint_1049.rll %windir%system32
copy /Y \serversharex86RSClientPrint_2052.rll %windir%system32
copy /Y \serversharex86RSClientPrint_3082.rll %windir%system32
copy /Y \serversharegdiplus.dll %windir%system32
copy /Y \serversharersver5.txt %windir%system32
regsvr32.exe /s %windir%system32rsclientprint.dll

GOTO FINISH

:X64

if not exist %systemroot%SysWoW64rsver5.txt goto ADD64

GOTO END

:ADD64

%systemroot%SysWoW64regsvr32.exe /u /s %systemroot%SysWoW64rsclientprint64.dll
%systemroot%SysWoW64regsvr32.exe /u /s %systemroot%SysWoW64rsclientprint.dll

copy /Y \servershare64RSClientPrint64.dll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_1028.rll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_1031.rll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_1033.rll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_1036.rll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_1040.rll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_1041.rll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_1042.rll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_1046.rll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_1049.rll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_2052.rll %systemroot%SysWoW64
copy /Y \servershare64RSClientPrint64_3082.rll %systemroot%SysWoW64

copy /Y \serversharex86RSClientPrint.dll %systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_1028.rll %systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_1031.rll %systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_1033.rll %systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_1036.rll%systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_1040.rll %systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_1041.rll %systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_1042.rll %systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_1046.rll %systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_1049.rll %systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_2052.rll %systemroot%SysWoW64
copy /Y \serversharex86RSClientPrint_3082.rll %systemroot%SysWoW64

copy /Y \serversharegdiplus.dll %systemroot%SysWoW64
copy /Y \serversharersver5.txt %systemroot%SysWoW64

%systemroot%SysWoW64regsvr32.exe /s %systemroot%SysWoW64rsclientprint64.dll
%systemroot%SysWoW64regsvr32.exe /s %systemroot%SysWoW64rsclientprint.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 FilesMicrosoft SQL ServerMSRS11.MSSQLSERVERReporting ServicesReportServerbinRSClientPrint-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

Leave a Reply

Your email address will not be published. Required fields are marked *