I am trying to use GetReportParameters method of the reportserver webservice. Here is the code.
ReportingService.ReportingService rService = new ReportingService.ReportingService();
rService.Credentials = System.Net.CredentialCache.DefaultCredentials;
string historyID = null;
bool forRendering = true;
ParameterValue[] values = null;
DataSourceCredentials[] credentials = null;
ReportParameter[] parameters;
parameters = rService.GetReportParameters
(
"/Demo/TransactionReport",
historyID,
forRendering,
values,
credentials
);
foreach(ValidValue v in parameters[0].ValidValues)
{
Response.Write(v.Label + ": " + v.Value);
Response.Write("<br>");
}
But when i executed the above code, i am getting the following error..
System.Web.Services.Protocols.SoapException: The permissions granted to user 'DPA32W126\ASPNET' are insufficient for performing this operation. -->
I understand there is no problem with the code, but security settings needs to be changed for it to work.
Can anyone guide me on how to make the above code working.
Thankyou,
Regards,
Rajesh Jagadeesan.
--
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.If your app is an ASP.NET app, you need to add identity impersonate=true in
our web.config. Otherwise, your app will run as the ASPNET account, not as
your client's account.
--
Tudor Trufinescu
Dev Lead
Sql Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:#fTKv5NaEHA.2972@.TK2MSFTNGP12.phx.gbl...
> I am trying to use GetReportParameters method of the reportserver
webservice. Here is the code.
> ReportingService.ReportingService rService = new
ReportingService.ReportingService();
> rService.Credentials = System.Net.CredentialCache.DefaultCredentials;
> string historyID = null;
> bool forRendering = true;
> ParameterValue[] values = null;
> DataSourceCredentials[] credentials = null;
> ReportParameter[] parameters;
> parameters = rService.GetReportParameters
> (
> "/Demo/TransactionReport",
> historyID,
> forRendering,
> values,
> credentials
> );
> foreach(ValidValue v in parameters[0].ValidValues)
> {
> Response.Write(v.Label + ": " + v.Value);
> Response.Write("<br>");
> }
> But when i executed the above code, i am getting the following error..
> System.Web.Services.Protocols.SoapException: The permissions granted to
user 'DPA32W126\ASPNET' are insufficient for performing this operation. -->
> I understand there is no problem with the code, but security settings
needs to be changed for it to work.
> Can anyone guide me on how to make the above code working.
> Thankyou,
> Regards,
> Rajesh Jagadeesan.
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.|||Hi Jenny:
You can use the NetworkCredential class from the System.Net namespace.
Also, my article might be of some help:
http://odetocode.com/Articles/216.aspx
--
Scott
http://www.OdeToCode.com
On Mon, 13 Sep 2004 13:13:08 -0700, "Jenny"
<Jenny@.discussions.microsoft.com> wrote:
>Hi! I am having a similar problem. I am creating a custom interface for
>users to gather parameters and then select reports to view. I want to only
>pass in the parameters that a given report needs rather then all the
>parameters I am gathering. I am getting this error when the
>GetReportParameters runs:
>The request failed with HTTP status 401: Unauthorized.
>I tried adding in the identity impersonate = true but it didn't do anything.
> Can I change the credentials that are passed in? What else can I check? Is
>there another way to check what parameters are needed for a given report?
>Thank you for the help!
>Jenny
>
Monday, March 26, 2012
GetReportParameters
Labels:
code,
database,
getreportparameters,
method,
microsoft,
mysql,
oracle,
reportingservice,
reportserver,
rservice,
server,
sql,
webservice
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment