-
ReportViewer not working ...
Hi Guys,
I am trying to call SSRS from .net which is throwing "Client found response content type of '', but expected 'text/xml'. The request failed with an empty response." .
Environment:
VS 2008 with .net framework 3.5 SP1
SQL Server 2008
I am using following code to call the reports:
Namespace:
using Microsoft.Reporting.WebForms;
web.config:
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
.aspx
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<rsweb:ReportViewer ID="ssrsReportViewer" runat="server">
</rsweb:ReportViewer>
code behind:
ssrsReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote ;
ssrsReportViewer.ServerReport.ReportServerUrl = new Uri("http://203.0.9.9.29/ReportServer_USDSQLSSRS/TestReports", UriKind.Absolute);
ssrsReportViewer.ShowParameterPrompts = false;
ssrsReportViewer.ShowPrintButton = true;
ssrsReportViewer.ServerReport.ReportPath = "EmployeeData";
reportParamCollection = GetEmpParams(ssrsReportViewer); //Gets parameters collection
ssrsReportViewer.ServerReport.SetParameters(report ParamCollection);
ssrsReportViewer.ServerReport.Refresh();
ReportParameter[] GetEmpParmas(Microsoft.Reporting.WebForms.ReportVi ewer ssrsReportViewer)
{
Microsoft.Reporting.WebForms.ReportParameter[] reportParameterCollection = new Microsoft.Reporting.WebForms.ReportParameter[16];
reportParameterCollection[0] = new Microsoft.Reporting.WebForms.ReportParameter();
reportParameterCollection[0].Name = "EmpID";
reportParameterCollection[0].Values.Add("10");
reportParameterCollection[1] = new Microsoft.Reporting.WebForms.ReportParameter();
reportParameterCollection[1].Name = "DivisionID";
reportParameterCollection[1].Values.Add("8901");
return reportParameterCollection;
}
Report Name is EmployeeData.rdlc.
Reports are hosted on different domain and I do have all the privileges except the buildreport option.
What is going wrong and how to correct?
Thanks in advance for your reply.
-Inath
-
Can you review the report in RS console?
-
I am able to review/open the report in RS and using window.open("url","name") from my .net application and directly open the report url from my local machine.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|