I have a .NET 4.5, Visual studio 2012 winforms project that is supposed to display quite a number of SSRS 2005 remote reports with the visual studio 2012 reportViewer control.
Apparently, to display the remote report with reportViewer in visual studio 2012, the Reporting services report server must be SQL Server 2008 or later. So I’m stuck and wondering if there might be a work around or if its possible to use reportViewer for VS 2008 inside a VS 2012 project.
The am getting is
“Remote report processing requires Microsoft SQL Server 2008 Reporting Services or later“
This is how am setting the report source
private void SetReportParameters()
{
//Set Processing Mode
reportViewer1.ProcessingMode = ProcessingMode.Remote;
// Set report server and report path
reportViewer1.ServerReport.ReportServerUrl = new Uri("http://Server/ReportServer");
reportViewer1.ServerReport.ReportPath = "/MyApplicationReports/ReportName";
ReportParameterInfoCollection pInfo = default(ReportParameterInfoCollection);
System.Collections.Generic.List<ReportParameter> paramList = new System.Collections.Generic.List<ReportParameter>();
paramList.Add(new ReportParameter("EmpID", OriginalEmployeeID.ToString(), false));
reportViewer1.ServerReport.SetParameters(paramList);
pInfo = reportViewer1.ServerReport.GetParameters();
// Process and render the report
reportViewer1.RefreshReport();
}
And then
private void EmployeeLeaveHistory_Load(object sender, EventArgs e)
{
SetReportParameters();
this.reportViewer1.RefreshReport();
}
OR could there be away for first getting the remote report, convert it to a local report object and display the local report object in the reportviewer?
I got a solution. I went to project references and removed both Microsoft.ReportViewer.Common.dll and Microsoft.ReportViewer.WinForms.dll for Visual studio 2012.
I then re-added references to Microsoft.ReportViewer.Common.dll and Microsoft.ReportViewer.WinForms.dll for visual studio 9 (VS 2008) and now reportviewer for VS 2008 is working inside VS 2012.