Reg: Building custom webpart for report viewer
-
Friday, February 24, 2012 7:16 AM
hi
I am having the ssrs configured to MOSS 2007 in integrated mode, i want to create the custom report viewer web part for that.
the rdl file and data source file are deployed to sharepoint report library (http://SharepoitnSite/TestReportLibrary/ReportFolder/Report1.rdl)
I am trying the below code , but it is not helping me out, can any one please help me out in this.
public class CustomReportViewerWebpart : WebPart
{
protected override void CreateChildControls()
{
ReportViewer reportviewer = new ReportViewer();
reportviewer.EnableViewState = true;
reportviewer.ProcessingMode = ProcessingMode.Remote;
reportviewer.ServerReport.ReportServerUrl = new Uri("http://SharepoitnSite/TestReportLibrary/");
reportviewer.ServerReport.ReportPath = "http://SharepoitnSite/TestReportLibrary/ReportFolder/Report1.rdl";
//reportviewer.ServerReport.SetParameters(new ReportParameter("parm","12"));
reportviewer.ShowToolBar = true;
reportviewer.ShowParameterPrompts = true;
reportviewer.AsyncRendering = false;
Controls.Add(reportviewer);
base.CreateChildControls();
}
}Getting some error on rendering of report--- > Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message: -- <HTML dir="ltr"> <HEAD><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid"
regards Vimal
All Replies
-
Wednesday, February 29, 2012 2:57 AMModerator
Hi singhal,
This is may be your current domain account have not the full permission. The following solution is from a link, you can refer to it.
Log in to SQL Server Database Engine.
1. Under Security Accounts, give full permissions for <Your Domain>\<You> and Network Service Account for all databases and all roles.
2. Now open reporting services configuration.
3. Change windows service identity to Network Service. Click on Apply.
4. Click on Database Setup. Select Credentails type as "Service Credentials".Press Apply.
http://social.msdn.microsoft.com/forums/en-US/vststest/thread/505f5063-0cf8-499c-840d-f4fe6f74ed3c/
Thanks,
Jack
- Marked As Answer by Jack-GaoMicrosoft Contingent Staff, Moderator Sunday, March 04, 2012 6:16 AM

