How to pass parameters to custom SSRS reports activated to print from the Dynamics GP windows

This is a reposting of an article Viswanathan Neelakantan originally wrote on my Developing for Dynamics GP blog.
Recently there was a question on the forums regarding passing parameters to custom SSRS reports assigned to Dynamics GP windows.
