Monday, February 20, 2012

Permission error when trying to set parameters of a server report

Hi There,

I am using SQL Server Reporting Services and generating reports and have them deployed on a report server on Machine A. I have an asp.net web application hosted on MAchine B which has a report viewer control which is used to display a predefined report that is already published on a Reporting Services report server except that it passes a set of parameters for the report. I get this error...The permissions granted to user 'Bla.." are insufficient for performing this operation. (rsAccessDenied) when I try to set the parameters..like this..

param[1] = new Microsoft.Reporting.WebForms.ReportParameter("EndDate", DateTime.Now.ToShortDateString());
param[2] = new Microsoft.Reporting.WebForms.ReportParameter("Site", "1");
reportViewer.ServerReport.SetParameters(param);
reportViewer.ServerReport.Refresh();

I have integrated windows authentication set on the web application (report and report server)

Can anybody suggest me why I am getting this error(breaks at code in red). Any suggestions are greatly aprreciated!!

Thanks.

Sam.

Does the report render fine if you do not set parameters via code?

No comments:

Post a Comment