December 9, 2008 at 11:18 am
Hello guys,
I was able to successfully tackle the previous error that incurred in my report server
project. and it was about the NT Authority\Service account was not having enough
rights to play with the report server. But I figured the way out by seeing the various blogs.
Now I am getting the Report Viewer Control popping up in the brower when I type in the
parameter in the Text box (which is a valid name) and when I press Button "Show Report"
then it saw the report viewer in the browser as NT Authority\Service account now has the
browsing rights enabled. But now I get two more errors in the that report viewer control ...
(1) An error has occurred during report processing.
Cannot create a connection to data source 'DataSource1'.
(2) Cannot open database "AdventureWorks" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
I also added this above account name in the SQL server login accounts for AdventureWorks DB.
But these 2 errors keeps on popping in my IE browser.
Any Help .... Please also see my Csharp code below in the button_click() event to show the
the report viewer.
protected void Button1_Click(object sender, EventArgs e)
{
//ReportViewer ReportViewer1 = new ReportViewer();
string sReportServerURL = "http://localhost:90/ReportServer";
string sReportPath = "/Report Project1/Report1";
Microsoft.Reporting.WebForms.ReportParameter[] Param = {new Microsoft.Reporting.WebForms.ReportParameter("Lname",this.TextBox1.Text)};
//Param[0] = new Microsoft.Reporting.WebForms.ReportParameter("Lname", this.TextBox1.Text);
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl = new Uri(sReportServerURL);
ReportViewer1.ServerReport.ReportPath = sReportPath;
ReportViewer1.ServerReport.SetParameters(Param); //I was getting error in this line but now solved
ReportViewer1.ShowParameterPrompts = false;
ReportViewer1.ShowPromptAreaButton = false;
ReportViewer1.ServerReport.Refresh();
ReportViewer1.Visible = true;
}
Thanks in advance. Any help appreciated.:)
DEVAM
December 10, 2008 at 12:43 pm
In report server you will have a datasource set up (DataSource1). If you view it's properties in report manager you will see the credentials it is using to connect to the AdventureWorks database on your server. It's not clear how you have the credentials set currently, but you have several options - ultimately you need to ensure that the credentials supplied to the report have permissions in the AdventureWorks database. Currently NT Authority\Service does not.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply