Using ReportViewer to view your SSRS report
This recipe shows
how to display a report using the ReportViewer
redistributable.
Getting ready
First, you need to download ReportViewer
redistributable and install it on your machine. At the time of writing of this book, the download link is at:
http://www.microsoft.com/en-us/download/details.aspx?id=6442
Identify your SSRS 2012 Report Server URL. We will need to reference the ReportService2010
web service, and you can reference it using:
<ReportServer URL>/ReportService2010.asm
Pick a report you want to display using the ReportViewer
control. Identify the full path, and replace the value of the variable $reportViewer.ServerReport.ReportPath
in the script.
How to do it...
This list shows how we can display a report using ReportViewer
.
Open the PowerShell console by going to Start | Accessories | Windows PowerShell | Windows PowerShell ISE.
Load the assembly for
ReportViewer
as follows:#load the ReportViewer WinForms assembly Add-Type -AssemblyName...