Thursday, March 29, 2012

Cristal Reports for OLAP CUBE

I have created a crystal report connecting an OLAP cube .But once i
try to view a report it took around 15 minutes and finaly gave an
error like "cannot retrieve data from cube".I want to know why it is
and how can i create a crystal report for OLAP CUB."Pradeep" <aprpradeep@.hotmail.com> wrote in message
news:3f64305f.0402250014.39e80bee@.posting.google.c om...
> I have created a crystal report connecting an OLAP cube .But once i
> try to view a report it took around 15 minutes and finaly gave an
> error like "cannot retrieve data from cube".I want to know why it is
> and how can i create a crystal report for OLAP CUB.

It sounds more like a Crystal Reports question than an MSSQL one, but you
may want to try posting in microsoft.public.sqlserver.olap, to see if anyone
there has experience of this.

Simon|||"Pradeep" <aprpradeep@.hotmail.com> wrote in message
news:3f64305f.0402250014.39e80bee@.posting.google.c om...
> I have created a crystal report connecting an OLAP cube .But once i
> try to view a report it took around 15 minutes and finaly gave an
> error like "cannot retrieve data from cube".I want to know why it is
> and how can i create a crystal report for OLAP CUB.

You may want to capture a trace using the Profiler tool which should show
you what SELECT statements are being passed from Crystal. See BOL on
Profiler. Once you capture the trace you could then run the SELECT
statement(s) in Query Analyzer which may tell you if you are having an issue
with your reporting tool or if your SELECT statements cause errors or
timeouts.|||"Terri" <Terri@.spamaway.com> wrote in message news:<c1jmk1$33q$1@.reader2.nmix.net>...
> "Pradeep" <aprpradeep@.hotmail.com> wrote in message
> news:3f64305f.0402250014.39e80bee@.posting.google.c om...
> > I have created a crystal report connecting an OLAP cube .But once i
> > try to view a report it took around 15 minutes and finaly gave an
> > error like "cannot retrieve data from cube".I want to know why it is
> > and how can i create a crystal report for OLAP CUB.
> You may want to capture a trace using the Profiler tool which should show
> you what SELECT statements are being passed from Crystal. See BOL on
> Profiler. Once you capture the trace you could then run the SELECT
> statement(s) in Query Analyzer which may tell you if you are having an issue
> with your reporting tool or if your SELECT statements cause errors or
> timeouts.

Profiler probably won't help here - as far as I know, it works with
connections to SQL Server only, not to Analysis Services.

Simon

CRI Designer Adornment class - host WinForms controls?

Hi,

I'm developing a CRI and in design mode I would like to have some controls on my adornment windows. Is there a way to use WinForms controls here instead of redefining the wheels...?

Thomas

Sorry, using Winforms controls in adornments is not supported.

-Albert

|||

So what do you propose for more complicated UIs? The properties dialog as the only solution?

Thomas

|||

That is one possible solution. You don't have much flexibility to dynamically change the appearance of your adornment, but you can intercept mouse movements and clicks. You can create a dialog that is invoked by clicking in the adornment.

-Albert

Cretae a view in one DB with a stored procedure from another DB

Hi,

Ik created an application with visuals basic.NET. This has a
connection string to one database, let's say 'A'. In this database a
stored procedure is called which should execute a string (which is
passed by the) VB tool. This string is a CREATE VIEW statement en this
should be executed in another database let's say 'B'.

I tried this in Transact - SQL

EXEC('USE B;' + Query)

An error occurs : CREATE VIEW should be the first in a batched
statement.

Could anyone help me with this one?

Greetz,
Hennie"Hennie de Nooijer" <hdenooijer@.hotmail.com> wrote in message
news:191115aa.0405240403.724292f@.posting.google.co m...
> Hi,
> Ik created an application with visuals basic.NET. This has a
> connection string to one database, let's say 'A'. In this database a
> stored procedure is called which should execute a string (which is
> passed by the) VB tool. This string is a CREATE VIEW statement en this
> should be executed in another database let's say 'B'.
> I tried this in Transact - SQL
> EXEC('USE B;' + Query)
> An error occurs : CREATE VIEW should be the first in a batched
> statement.
> Could anyone help me with this one?
> Greetz,
> Hennie

You need a GO right before the CREATE VIEW statement, and this won't work in
dynamic SQL. In any case, this isn't really a good way to create a database
object - it would probably be a lot easier for your client application to
connect directly to database B. Or if you really want to do it from SQL,
then why not create the stored procedure in database B and call it from
database A?

It might help if you can explain what you're trying to achieve, and someone
may be able to suggest a better solution, as creating objects dynamically
from a user application can create significant problems with security and
maintenance. But since you didn't say what your goal is, you may have a good
reason for doing this.

Simon

Creditcard Validation script

Does anyone have a T-SQL script or function that validates US creditcard
numbers?
I am not talking about whether the account is current, just whether the
numeric value of the card is valid. Something similar to what one might use
for zip codes or phone numbers.
Right now I have something that looks for 15 or 16 characters in length and
then checks the first digit for the type of card (e.g., 3 = Amex).
However I was hoping that someone who has worked with this issue might give
me some insights into what conventions or standards a credit card number mus
t
comply with in order to be valid.
ThanksOn Sun, 19 Feb 2006 11:12:26 -0800, "Dave" <Dave@.discussions.microsoft.com>
wrote:
in <331D1E4C-2EB2-4ABF-ACC5-08F5D3E5FC2A@.microsoft.com>

>Does anyone have a T-SQL script or function that validates US creditcard
>numbers?
>I am not talking about whether the account is current, just whether the
>numeric value of the card is valid. Something similar to what one might use
>for zip codes or phone numbers.
>Right now I have something that looks for 15 or 16 characters in length and
>then checks the first digit for the type of card (e.g., 3 = Amex).
>However I was hoping that someone who has worked with this issue might give
>me some insights into what conventions or standards a credit card number mu
st
>comply with in order to be valid.
>Thanks
Here's a URL that I took to heart and converted to VBScript for use in my
classic ASP environment:
http://www.sitepoint.com/print/card...ation-class-php
If you want to see the VBScript also, post back and I'll put it up. I felt
that
this covered it well enough that ashamedly I didn't make any efforts to furt
her
validate the facts that the author presented.
Stefan Berglund

credit cards in sql server table

Dear All,
I need to keep credit cardd details in a an SQL server table.
What's the best way to make sure data is secure? Is there any built in encryption that can be used so data is not stored as text?
ThanksLook up encryption in the SQL 2005 BOL. Encryption functions are included in SQL 2005, but will take some reading to master.|||ohh goody, thanks for the info|||hang on, I need this done in version 8. I guess that's a new feature to SQL 2005.

Is there a 3rd party product for this for version 8?

Credit Card Validation

Hi,
I have a bunch of bad credit cards in my database and need a SQL Script to
find out which ones are actually bad. Does any of you have a credit card
validation sql script that I maybe able to use?
Thank you,
ShivaYou will need to contact the issuer to see if accounts have been
closed, but otherwise, you can do a quick check by Googling card
validation rouitnes. Certain four-digit gorups can only be in certain
places for each card type.|||Sorry Celko. Your answer did not help. I checked google before posting this
message here. There is an algorithm to check for valid credit card numbers.
The SQL script for this validation is what I am interested in.
"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1146936845.448785.24310@.j73g2000cwa.googlegroups.com...
> You will need to contact the issuer to see if accounts have been
> closed, but otherwise, you can do a quick check by Googling card
> validation rouitnes. Certain four-digit gorups can only be in certain
> places for each card type.
>|||HAHA - A helpful answer from Celko really is expecting a lot, you're
lucky he didn't just complain about your code (though you avoided this
by not posting any).
If you post the algorithm, and your table structures (or the entire DDL
ideally) then perhaps it can be translated into some SQL.|||Though I should add, you didn't give him anything to work with. The
best way to get useful answers is to post what might seem excessive
amounts of detail. the more the better, scrolling down takes no time,
but if you give everyone loads of info on how to create your problem,
then what you want the solution to be, it makes things really easy for
everyone else, and you'll almost certainly get a response.|||On Sat, 6 May 2006 10:20:52 -0700, "Shiva" <arbitsquare@.hotmail.com>
wrote:
in <emBUuFTcGHA.2068@.TK2MSFTNGP02.phx.gbl>

>Hi,
>I have a bunch of bad credit cards in my database and need a SQL Script to
>find out which ones are actually bad. Does any of you have a credit card
>validation sql script that I maybe able to use?
>Thank you,
>Shiva
>
I used the information here to create VBScript to validate credit card
numbers. You should be able to understand this and convert it to
working TSQL fairly easily.
http://www.sitepoint.com/article/ca...ation-class-php
This posting is provided "AS IS" with no warranties and no guarantees either
express or implied.
Stefan Berglund|||Try this:
/*
* DROP PROC val_credit_card_numbers
*/
IF OBJECT_ID('val_credit_card_numbers') IS NOT NULL
BEGIN
DROP PROC val_credit_card_numbers
PRINT '<<< DROPPED PROC val_credit_card_numbers >>>'
END
go
create procedure val_credit_card_numbers
as
begin
/*
Note: The following table must be created and populated prior to
calling this procedure:
create table #credit_card_numbers(
id int not null,
card_no char(20) not null,
valid char(1) not null
)
*/
declare @.digit int
create table #checksum(
id int not null,
digit smallint not null,
value smallint not null
)
create table #checksum_totals(
id int not null,
value smallint not null
)
create unique clustered index i1 on #checksum_totals(id)
-- Assume numbers are invalid unless proven otherwise.
update #credit_card_numbers
set valid = 'N'
if @.@.error <> 0
begin
raiserror 99999 'Error setting #credit_card_numbers.valid to N'
return 1
end
select @.digit = 20
-- Starting from the right most digit of each card number (excluding
check digit), multiply each digit with 1 or 2
-- (starting from 1 and alternating between 1 and 2 until the left
most digit is reached.)
while @.digit > 0
begin
insert #checksum(
id,
digit,
value
)
select id,
@.digit,
convert(smallint, substring(card_no, @.digit, 1)) *
(((len(rtrim(card_no)) - @.digit) % 2) + 1)
from #credit_card_numbers
where len(rtrim(card_no)) > @.digit
and IsNumeric(card_no) = 1
if @.@.error <> 0
begin
raiserror 99999 'Error inserting into #checksum'
return 1
end
select @.digit = @.digit - 1
end
-- Where the checksum is 2 digits, add each of the digits together.
update #checksum
set value = (value / 10) + (value % 10)
where value >= 10
if @.@.error <> 0
begin
raiserror 99999 'Error updating #checksum (1).'
return 1
end
-- Get checksum totals for each card.
insert #checksum_totals(
id,
value
)
select id,
sum(value)
from #checksum
group by
id
if @.@.error <> 0
begin
raiserror 99999 'Error inserting into #checksum_totals.'
return 1
end
-- Do the Mod 10 calculation.
update #checksum_totals
set value = (10 - (value % 10)) % 10
if @.@.error <> 0
begin
raiserror 99999 'Error updating #checksum_totals.'
return 1
end
-- Compare the check digit of each card number with the calculated
checksum to determine whether it's valid.
update #credit_card_numbers
set valid = 'Y'
from #credit_card_numbers c,
#checksum_totals ct
where c.id = ct.id
and IsNumeric(c.card_no) = 1
and convert(smallint, substring(c.card_no, len(rtrim(c.card_no)), 1))
= ct.value
if @.@.error <> 0
begin
raiserror 99999 'Error setting #credit_card_numbers.valid to Y'
return 1
end
return 0
end
go
IF OBJECT_ID('val_credit_card_numbers') IS NOT NULL
BEGIN
PRINT '<<< CREATED PROC val_credit_card_numbers >>>'
GRANT EXECUTE ON val_credit_card_numbers TO PUBLIC
END
ELSE
PRINT '<<< FAILED CREATING PROC val_credit_card_numbers >>>'
go|||Thank you! This is exactly what I was looking for.
-Shiva
<kriskirk@.hotmail.com> wrote in message
news:1146969910.177407.67600@.y43g2000cwc.googlegroups.com...
> Try this:
> /*
> * DROP PROC val_credit_card_numbers
> */
> IF OBJECT_ID('val_credit_card_numbers') IS NOT NULL
> BEGIN
> DROP PROC val_credit_card_numbers
> PRINT '<<< DROPPED PROC val_credit_card_numbers >>>'
> END
> go
> create procedure val_credit_card_numbers
> as
> begin
> /*
> Note: The following table must be created and populated prior to
> calling this procedure:
> create table #credit_card_numbers(
> id int not null,
> card_no char(20) not null,
> valid char(1) not null
> )
> */
> declare @.digit int
> create table #checksum(
> id int not null,
> digit smallint not null,
> value smallint not null
> )
> create table #checksum_totals(
> id int not null,
> value smallint not null
> )
> create unique clustered index i1 on #checksum_totals(id)
> -- Assume numbers are invalid unless proven otherwise.
> update #credit_card_numbers
> set valid = 'N'
> if @.@.error <> 0
> begin
> raiserror 99999 'Error setting #credit_card_numbers.valid to N'
> return 1
> end
> select @.digit = 20
> -- Starting from the right most digit of each card number (excluding
> check digit), multiply each digit with 1 or 2
> -- (starting from 1 and alternating between 1 and 2 until the left
> most digit is reached.)
> while @.digit > 0
> begin
> insert #checksum(
> id,
> digit,
> value
> )
> select id,
> @.digit,
> convert(smallint, substring(card_no, @.digit, 1)) *
> (((len(rtrim(card_no)) - @.digit) % 2) + 1)
> from #credit_card_numbers
> where len(rtrim(card_no)) > @.digit
> and IsNumeric(card_no) = 1
> if @.@.error <> 0
> begin
> raiserror 99999 'Error inserting into #checksum'
> return 1
> end
> select @.digit = @.digit - 1
> end
> -- Where the checksum is 2 digits, add each of the digits together.
> update #checksum
> set value = (value / 10) + (value % 10)
> where value >= 10
> if @.@.error <> 0
> begin
> raiserror 99999 'Error updating #checksum (1).'
> return 1
> end
> -- Get checksum totals for each card.
> insert #checksum_totals(
> id,
> value
> )
> select id,
> sum(value)
> from #checksum
> group by
> id
> if @.@.error <> 0
> begin
> raiserror 99999 'Error inserting into #checksum_totals.'
> return 1
> end
> -- Do the Mod 10 calculation.
> update #checksum_totals
> set value = (10 - (value % 10)) % 10
> if @.@.error <> 0
> begin
> raiserror 99999 'Error updating #checksum_totals.'
> return 1
> end
> -- Compare the check digit of each card number with the calculated
> checksum to determine whether it's valid.
> update #credit_card_numbers
> set valid = 'Y'
> from #credit_card_numbers c,
> #checksum_totals ct
> where c.id = ct.id
> and IsNumeric(c.card_no) = 1
> and convert(smallint, substring(c.card_no, len(rtrim(c.card_no)), 1))
> = ct.value
> if @.@.error <> 0
> begin
> raiserror 99999 'Error setting #credit_card_numbers.valid to Y'
> return 1
> end
> return 0
> end
> go
> IF OBJECT_ID('val_credit_card_numbers') IS NOT NULL
> BEGIN
> PRINT '<<< CREATED PROC val_credit_card_numbers >>>'
> GRANT EXECUTE ON val_credit_card_numbers TO PUBLIC
> END
> ELSE
> PRINT '<<< FAILED CREATING PROC val_credit_card_numbers >>>'
> go
>

Credentials used to run this report are not stored.

I created a report in SSRS, and deployed it. I have created security where when users run the on demand report, it will prompt them for a username and password. I went to the properties of the report then Execution, and tried to set up report execution snapshot and got an error 'Credentials used to run this report are not stored.' I get the same error if I go to History and try to select any of the options there.

Hello,

In order to create a subscription/snapshot, you have to store credentials to run the report. If you don't store the credentials, when it goes to run unattended, it has no connection information.

Jarret

|||Where do I store these credentials?|||

Hello,

Go to the properties of your report, then click on 'Data Sources' on the left. In here, select 'Credentials stored securely in the report server' and supply a username and password. If you use a Windows account, you have to give the domain as well (domain\user) and check the box for 'Use as Windows credentials when connecting to the data source'. Hit Apply.

Hope this helps.

Jarret

|||That worked....thanks!!

Credentials used to run this report are not stored

Hi all,

When I create a new report subscription in report manager, I got this error

Credentials used to run this report are not stored

any idea?

Thanks,

Jone

Can you go to report properties -> Data Sources and make sure that "Connect Using Credentials stored securely in the report server" is selected and valid user name and password provided?

Thanks,
Sharmila

|||

Thanks for your response.

By the way, which name and password should I input. I tried to using ASPNET as the username (or 'sa' and the password to access sql aerver) but it failed, and gave error message bad user name or password.

Thanks,

jone

|||

For example, if the below is your connection string, you need to enter a user name and password to access the data source.

data source=<ServerName>; initial catalog=<SampleDB>

Thanks,
Sharmila

|||

Thanks, Sharmila.

I use user name = 'sa' and password = 'access' to access my datasource, and I tried to use them in 'Credentials stored securely in the report server', and checked both or first ckeckbox under this selection, and I got

Logon failed. (rsLogonFailed)

  • Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)|||

    Jone,

    If you select the 'Credentials stored securely in the report server', you should not check the boxes for 'Use as Windows credentials when connecting to the data source' or 'Impersonate the authenticated user after a connection has been made to the data source'. After entering user name = 'sa' and password = 'access' , press Apply at the bottom and try to view your report.

    If this still doesn't work, you should try to login to the database using user name = 'sa' and password = 'access' through Management Studio to see if that works.

    Hope this helps.

    Jarret

    |||

    Thanks, Jarret.

    According to your suggestion, I configured my datasource and ran my report, and I got error

  • Non-Windows user credentials were supplied for a non-http connection to Analysis Services. The Microsoft SQL Server Analysis Services data extension requires Windows Integrated Security unless connecting via http or https.|||

    Could you use a Windows domain account and it's password? Then, you will need to check the box for 'Use as Windows credentials when connecting to the data source' also.

    Jarret

    |||

    Thank you, Jarret.

    I used my user name an dpassword that I use to login my machine, and checked the 'use as windows credentials when connectingto the data source', and the subscription has been created.

    But I can't find the e-mail extension on the report. How can the e-mail extension or icon be availale on the report?

    BTW, in sql server-->configuration tools--.report service configuration -->email settings,

    I input my e-mail address as the sender's address, and the name of our exchange server name as the 'smpt server' name, or should I input "default virtual smtp server' as the smtp server name?

    Thanks,

    Jone

    |||

    Hi, more question:

    since the application will be used by others, what should I handle the credential issues since I can't use my username and password there?

    Thanks,

    Jone

    |||

    I don't think there is an email extension for Reporting Services, you might be able to find something out there that will add this functionality though. I haven't heard of any, but I haven't looked either.

    I think you will need to leave your exchange server in the SMTP Server name.

    Jarret

    |||

    You have you have the credentials stored in order to create a subscription.

    I just did a test and it seems that the stored credentials are not used when a user runs the report from the browser. So, when your users run the report, you will still see their name in the ExecutionLog table as having executed the report. Also, you can restrict access to the report for specific users as well, just as normal.

    My test was: I set the stored credentials as my account, then had a co-worker run the report. Then, I looked in the ExecutionLog, it showed my co-workers account.

    Hope this helps.

    Jarret

    |||

    Thank you so much, Jarret. You save me days of time

    Jone

    |||

    Glad I could help Jone, can you mark this one as answered so others can view the solution?

    Jarret

    |||No problem!
  • credentials type - service credentials missing

    Hi All,

    On my 64bit itanium cluster, how come when I open up my Reporting Services Configuration Manager and go to the "Database Setup", under "Credentials Type" I am missing the option "Service Credentials"? This is how I have my dev server set up and would like it to be the same.

    This was due to us connecting to the individual node rather than to the cluster when opening up the reporting services configuration manager.

    Credentials trouble, please help

    Hello,
    When I created the datasource for my report, I checkd the save checkbox to
    save the username and password to connect to the database, but invoking the
    report thru URL integration fails and gives an error b/c of credentials. Why
    is that happening if the credentials are saved with the datasource inside the
    report?
    What is the limitation to the number of characters that can be passed in a
    URL string?
    Thank you in advance,
    RichardI had a similiar problem with the report server. I ended up changing
    the credentials to server credentials in both the report properties and
    in the properties of the report once it was on the server. Hope this
    helps.

    Credentials problem or deployment puzzle or permission problem?

    Hi,All:

    I had development a reporting service home page for our intranet . And I deployed this home page at "domain.server1" (for example) and my sql server database and reporting service is at another server "domain.server2"(for example). on the "domain.server1" , the Authentication methods is Integrated windows authentication. and on the "domain.server2" , with the reportingservice server properites and home folder, in the "permissions" tab, I had add the "domain.server1$" as system user role. so I can view my report via my home page and it works fine. If I remove the "domain.server1$" from the reporting service, there could be encountered an error "The permissions granted to user 'domain.server1$' are insufficient for performing this operation".

    I used

    rService.Credentials = System.Net.CredentialCache.DefaultCredentials;

    in my home page to list the reports. I think this must be a problem, so I change this code as

    System.Net.NetworkCredential myCreds = new System.Net.NetworkCredential();
    myCreds.Domain = "domain";
    myCreds.UserName = "UserName";
    myCreds.Password = "Password";
    rService.Credentials = myCreds;

    and add this "UserName" to a local group "group1" on "domain.server2" , and grant this group "group1" to access the reporting service server. It works fine.

    but now , I'm confused how to get the user's information (especially the password infomation , even though encrypted )?

    Does any one can give me some feedbacks?

    T.I.A

    henry

    http://blogs.msdn.com/bimusings/archive/2005/11/18/494436.aspx?CommentPosted=true#commentmessage

    I got the this scenarios a few days ago, after a few day's research.

    I found that we must configurate the webServer as a trusted server so it can pass the credentials to the SSRS.

    Allow a computer to be trusted for delegation

    http://technet2.microsoft.com/WindowsServer/en/library/b207ee9c-a055-43f7-b9be-20599b694a311033.mspx?mfr=true

    in the web applcation , we just set the Report viewer control credential like this:

    rService.Credentials = System.Net.CredentialCache.DefaultCredentials;

    we must configurate the webServer to support the Kerberos Authentication and Delegation

    How to configure IIS to support both the Kerberos protocol and the NTLM protocol for network authentication

    http://support.microsoft.com/kb/215383

    and It works.

    Good luck!

    Henry

    Credentials problem or deployment puzzle or permission problem?

    Hi,All:

    I had development a reporting service home page for our intranet . And I deployed this home page at "domain.server1" (for example) and my sql server database and reporting service is at another server "domain.server2"(for example). on the "domain.server1" , the Authentication methods is Integrated windows authentication. and on the "domain.server2" , with the reportingservice server properites and home folder, in the "permissions" tab, I had add the "domain.server1$" as system user role. so I can view my report via my home page and it works fine. If I remove the "domain.server1$" from the reporting service, there could be encountered an error "The permissions granted to user 'domain.server1$' are insufficient for performing this operation".

    I used

    rService.Credentials = System.Net.CredentialCache.DefaultCredentials;

    in my home page to list the reports. I think this must be a problem, so I change this code as

    System.Net.NetworkCredential myCreds = new System.Net.NetworkCredential();
    myCreds.Domain = "domain";
    myCreds.UserName = "UserName";
    myCreds.Password = "Password";
    rService.Credentials = myCreds;

    and add this "UserName" to a local group "group1" on "domain.server2" , and grant this group "group1" to access the reporting service server. It works fine.

    but now , I'm confused how to get the user's information (especially the password infomation , even though encrypted )?

    Does any one can give me some feedbacks?

    T.I.A

    henry

    http://blogs.msdn.com/bimusings/archive/2005/11/18/494436.aspx?CommentPosted=true#commentmessage

    I got the this scenarios a few days ago, after a few day's research.

    I found that we must configurate the webServer as a trusted server so it can pass the credentials to the SSRS.

    Allow a computer to be trusted for delegation

    http://technet2.microsoft.com/WindowsServer/en/library/b207ee9c-a055-43f7-b9be-20599b694a311033.mspx?mfr=true

    in the web applcation , we just set the Report viewer control credential like this:

    rService.Credentials = System.Net.CredentialCache.DefaultCredentials;

    we must configurate the webServer to support the Kerberos Authentication and Delegation

    How to configure IIS to support both the Kerberos protocol and the NTLM protocol for network authentication

    http://support.microsoft.com/kb/215383

    and It works.

    Good luck!

    Henry

    credentials of the user datasource

    Hi,

    I'd like to programme the execution of a report through the execution property option. However, when I try to do it a message error appears related to credentials of the datasource.

    The present action is impossible to complete, because the credentials of the user datasource needed to execute this report are not stored on report server database.

    I've tried all possible combinations.

    Any idea?

    Thanks.

    Please set user name and password of the user datasource

    following is the sample code to set it.

    Microsoft.Reporting.WebForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];

    crd[0] = new Microsoft.Reporting.WebForms.DataSourceCredentials();

    crd[0].Name = "DatasourceName";

    crd[0].UserId = User;

    crd[0].Password = Pwd;

    ReportViewer.ServerReport.SetDataSourceCredentials(crd);

    If you are using multiple data sources you need to set credentials for each datasource..

    please set datasource credentials after setting report and parameter of the report to report viewer..

    |||

    By "programme the execution of a report through the execution property option" you don't by any chance mean "I want to set up a snapshot or scheduled report through the Executioin panel of the Properties tab of the Report Manager"?

    If this is what you mean, then the message means exactly what it says: the datasource has to have its credentials stored with it (whether it is a shared datasource or one embedded in the report).

    If the datasource is set up to run with the credentials of the logged-in user, then it can't be queried when there is no logged-in user (such as when you want a snapshot to execute). Doesn't that make sense?

    So... how is the data set up for your report? And with what type(s) of credentials is it accessed?

    >L<

    Credentials not being passed with remote access

    I cannot remotely access SQL Server 2005 with Windows Authentication with a
    specific login (I get the error 18452 "this user is not associated with a
    trusted login.."). I ran a trace with the profiler and it shows that no
    values are being passed for the login/credentials.
    I can login to the server locally just fine with the login.
    Windows Authentication works with the same login work against another SQL
    Server machine.
    What could be specific to the login or the server that would cause the
    credentials not to be passed.
    --
    John Shahan> What could be specific to the login or the server that would cause the
    > credentials not to be passed.
    This could be caused by a firewall issue with domain controller
    communication. I've also seen this problem due to a time sync issue between
    the client and servers.
    Hope this helps.
    Dan Guzman
    SQL Server MVP
    "jp" <jp@.discussions.microsoft.com> wrote in message
    news:4B43E6E3-D0F0-4084-AED0-6D4139DA79CB@.microsoft.com...
    >I cannot remotely access SQL Server 2005 with Windows Authentication with a
    > specific login (I get the error 18452 "this user is not associated with a
    > trusted login.."). I ran a trace with the profiler and it shows that no
    > values are being passed for the login/credentials.
    > I can login to the server locally just fine with the login.
    > Windows Authentication works with the same login work against another SQL
    > Server machine.
    > What could be specific to the login or the server that would cause the
    > credentials not to be passed.
    > --
    > John Shahan|||Dan, thank you for your response. I have seen you post helpful information
    for many people before.
    We looked at the time sync yesterday and it is close.
    The odd thing is that it is specific to one login. Login "johnx" does not
    pass credentials from any machine. My other login "johnz" works from any
    machine. Also, no other users are reporting this problem with their login.
    That being the case, do you still think it could be a firewall issue and if
    so, what would I look for in the firewall configuration?
    And again, to make it more frustrating, "johnx" can use Windows
    Authentication on another SQL Server on the same domain with no problem.
    John Shahan
    "Dan Guzman" wrote:

    > This could be caused by a firewall issue with domain controller
    > communication. I've also seen this problem due to a time sync issue betwe
    en
    > the client and servers.
    > --
    > Hope this helps.
    > Dan Guzman
    > SQL Server MVP
    > "jp" <jp@.discussions.microsoft.com> wrote in message
    > news:4B43E6E3-D0F0-4084-AED0-6D4139DA79CB@.microsoft.com...
    >|||> That being the case, do you still think it could be a firewall issue and
    > if
    > so, what would I look for in the firewall configuration?
    If other users can successfully login with Windows authentication from the
    same machines that fail with "john", then it's probably not a firewall
    issue. Furthermore, since "johnx" can successfully login locally, it
    appears "johnx" is setup correctly in SQL Server.
    The main difference between local and remote access is the communication
    protocol. Local access usually uses LCP but remote access is usually done
    via TCP/IP or Named Pipes (as specified by the cliconfg.exe utility). Named
    pipes requires the Windows account to have the "access this computer from
    the network" right so make sure "johnx" has the right (via group membership)
    if you are using Named Pipes.
    After a successful connection of your working account, you can verify the
    connection protocol with:
    SELECT net_library
    FROM master..sysprocesses
    WHERE spid = @.@.spid
    If you still can't sort this out, try to connect using SSMS and post the
    full error message text here.
    Hope this helps.
    Dan Guzman
    SQL Server MVP
    "jp" <jp@.discussions.microsoft.com> wrote in message
    news:FC3706EE-CE61-47EE-85A4-DEDDA3A633F6@.microsoft.com...[vbcol=seagreen]
    > Dan, thank you for your response. I have seen you post helpful
    > information
    > for many people before.
    > We looked at the time sync yesterday and it is close.
    > The odd thing is that it is specific to one login. Login "johnx" does not
    > pass credentials from any machine. My other login "johnz" works from any
    > machine. Also, no other users are reporting this problem with their
    > login.
    > That being the case, do you still think it could be a firewall issue and
    > if
    > so, what would I look for in the firewall configuration?
    > And again, to make it more frustrating, "johnx" can use Windows
    > Authentication on another SQL Server on the same domain with no problem.
    > --
    > John Shahan
    >
    > "Dan Guzman" wrote:
    >|||Dan, thanks again for your help. I wanted to share what apparently turned
    out to be the solution.
    johnx was set up as a local login on sql server. Removing that login
    allowed windows authentication to work,
    John Shahan
    "Dan Guzman" wrote:

    > If other users can successfully login with Windows authentication from the
    > same machines that fail with "john", then it's probably not a firewall
    > issue. Furthermore, since "johnx" can successfully login locally, it
    > appears "johnx" is setup correctly in SQL Server.
    > The main difference between local and remote access is the communication
    > protocol. Local access usually uses LCP but remote access is usually done
    > via TCP/IP or Named Pipes (as specified by the cliconfg.exe utility). Nam
    ed
    > pipes requires the Windows account to have the "access this computer from
    > the network" right so make sure "johnx" has the right (via group membershi
    p)
    > if you are using Named Pipes.
    > After a successful connection of your working account, you can verify the
    > connection protocol with:
    > SELECT net_library
    > FROM master..sysprocesses
    > WHERE spid = @.@.spid
    > If you still can't sort this out, try to connect using SSMS and post the
    > full error message text here.
    > --
    > Hope this helps.
    > Dan Guzman
    > SQL Server MVP
    > "jp" <jp@.discussions.microsoft.com> wrote in message
    > news:FC3706EE-CE61-47EE-85A4-DEDDA3A633F6@.microsoft.com...
    >|||> johnx was set up as a local login on sql server. Removing that login
    > allowed windows authentication to work,
    I had assumed johnx was a domain user rather than a local Windows account.
    I'm glad you got it working.
    Dan Guzman
    SQL Server MVP
    "jp" <jp@.discussions.microsoft.com> wrote in message
    news:36AE4208-0F21-4B0C-A735-4F9663FC812C@.microsoft.com...[vbcol=seagreen]
    > Dan, thanks again for your help. I wanted to share what apparently turned
    > out to be the solution.
    > johnx was set up as a local login on sql server. Removing that login
    > allowed windows authentication to work,
    > --
    > John Shahan
    >
    > "Dan Guzman" wrote:
    >

    Credentials in Reporting Services?

    I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

    Is it possible?

    Any help will be appreciated!!!

    TIA

    YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

    prefix:datasourcename=value

    as the prefix is dsu (for user) or dsp (for password)

    HTH, Jens Suessmeyer.

    http://www.sqlserver2005.de

    |||

    Thanks for your reply Jens!!!

    But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

    |||Hi,
    Hope this could help you

    System.Net.CredentialCache myCache = new System.Net.CredentialCache();
    myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

    reportViewer.ShowCredentialPrompts = false;
    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
    reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
    reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
    reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
    reportViewer.PromptAreaCollapsed = false;
    reportViewer.RefreshReport();

    |||

    I am trying to use the example code provided for a simialr problem but the line (in VB)

    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

    always shows as read only. How do I get round this please?

    |||Hi ,
    I think your using report viewer web control ofr asp.net. I had same problem.
    Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


    But i hope this link could help you..

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

    If you found the way please post back here.


    Thanks & Best Regards|||

    I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

    I tried the following suggestion:

    reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

    reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

    reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

    CredentialCache cc = new CredentialCache();

    cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

    new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

    reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

    reportViewer1.ShowCredentialPrompts = false;

    reportViewer1.RefreshReport();

    ...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

    ReportingService rService = new ReportingService();

    rService.Credentials

    = new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

    CatalogItem[] catalogItems;

    catalogItems = rService.ListChildren("/", true);

    Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

    |||

    Hi Glenn,

    You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

    http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

    |||

    You can refer following link.

    http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

    |||

    Hi, you can try this, might help.

    I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

    network login user, I am using my application's user id and password to connect to datasource.

    By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

    It works for me.

    private void Form1_Load(object sender, EventArgs e)

    {

    .............................

    Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

    myCredential.UserId = "myuserid";

    myCredential.Password = "mypassword";

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    DataSourceCredentials[] myCredentials=null;

    if (reportdatasourcecollection.Count > 0)

    {

    myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

    }

    for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

    {

    ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

    myCredential.Name = datasourceinfo.Name;

    myCredentials[iIndex] = myCredential;

    }

    this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

    ...............................

    }

    |||

    Hi,

    I am facing the same problem.

    I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

    So what should be the Connection Methods in Shared DataSource?

    Nilesh

    |||

    Me too there's an error here.

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    any thoughts please?

    thanks.

    |||

    Ishwar,

    Thanks for the link. That is awesome. I got it working using the following code.

    ServerReport.ReportServerCredentials.NetworkCredentials

    = new NetworkCredential(properties.Username, properties.Password, properties.Domain);

    Credentials in Reporting Services?

    I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

    Is it possible?

    Any help will be appreciated!!!

    TIA

    YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

    prefix:datasourcename=value

    as the prefix is dsu (for user) or dsp (for password)

    HTH, Jens Suessmeyer.

    http://www.sqlserver2005.de

    |||

    Thanks for your reply Jens!!!

    But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

    |||Hi,
    Hope this could help you

    System.Net.CredentialCache myCache = new System.Net.CredentialCache();
    myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

    reportViewer.ShowCredentialPrompts = false;
    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
    reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
    reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
    reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
    reportViewer.PromptAreaCollapsed = false;
    reportViewer.RefreshReport();

    |||

    I am trying to use the example code provided for a simialr problem but the line (in VB)

    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

    always shows as read only. How do I get round this please?

    |||Hi ,
    I think your using report viewer web control ofr asp.net. I had same problem.
    Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


    But i hope this link could help you..

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

    If you found the way please post back here.


    Thanks & Best Regards|||

    I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

    I tried the following suggestion:

    reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

    reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

    reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

    CredentialCache cc = new CredentialCache();

    cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

    new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

    reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

    reportViewer1.ShowCredentialPrompts = false;

    reportViewer1.RefreshReport();

    ...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

    ReportingService rService = new ReportingService();

    rService.Credentials

    = new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

    CatalogItem[] catalogItems;

    catalogItems = rService.ListChildren("/", true);

    Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

    |||

    Hi Glenn,

    You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

    http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

    |||

    You can refer following link.

    http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

    |||

    Hi, you can try this, might help.

    I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

    network login user, I am using my application's user id and password to connect to datasource.

    By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

    It works for me.

    private void Form1_Load(object sender, EventArgs e)

    {

    .............................

    Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

    myCredential.UserId = "myuserid";

    myCredential.Password = "mypassword";

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    DataSourceCredentials[] myCredentials=null;

    if (reportdatasourcecollection.Count > 0)

    {

    myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

    }

    for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

    {

    ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

    myCredential.Name = datasourceinfo.Name;

    myCredentials[iIndex] = myCredential;

    }

    this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

    ...............................

    }

    |||

    Hi,

    I am facing the same problem.

    I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

    So what should be the Connection Methods in Shared DataSource?

    Nilesh

    |||

    Me too there's an error here.

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    any thoughts please?

    thanks.

    |||

    Ishwar,

    Thanks for the link. That is awesome. I got it working using the following code.

    ServerReport.ReportServerCredentials.NetworkCredentials

    = new NetworkCredential(properties.Username, properties.Password, properties.Domain);

    Credentials in Reporting Services?

    I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

    Is it possible?

    Any help will be appreciated!!!

    TIA

    YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

    prefix:datasourcename=value

    as the prefix is dsu (for user) or dsp (for password)

    HTH, Jens Suessmeyer.

    http://www.sqlserver2005.de

    |||

    Thanks for your reply Jens!!!

    But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

    |||Hi,
    Hope this could help you

    System.Net.CredentialCache myCache = new System.Net.CredentialCache();
    myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

    reportViewer.ShowCredentialPrompts = false;
    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
    reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
    reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
    reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
    reportViewer.PromptAreaCollapsed = false;
    reportViewer.RefreshReport();

    |||

    I am trying to use the example code provided for a simialr problem but the line (in VB)

    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

    always shows as read only. How do I get round this please?

    |||Hi ,
    I think your using report viewer web control ofr asp.net. I had same problem.
    Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


    But i hope this link could help you..

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

    If you found the way please post back here.


    Thanks & Best Regards|||

    I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

    I tried the following suggestion:

    reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

    reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

    reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

    CredentialCache cc = new CredentialCache();

    cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

    new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

    reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

    reportViewer1.ShowCredentialPrompts = false;

    reportViewer1.RefreshReport();

    ...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

    ReportingService rService = new ReportingService();

    rService.Credentials

    = new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

    CatalogItem[] catalogItems;

    catalogItems = rService.ListChildren("/", true);

    Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

    |||

    Hi Glenn,

    You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

    http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

    |||

    You can refer following link.

    http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

    |||

    Hi, you can try this, might help.

    I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

    network login user, I am using my application's user id and password to connect to datasource.

    By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

    It works for me.

    private void Form1_Load(object sender, EventArgs e)

    {

    .............................

    Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

    myCredential.UserId = "myuserid";

    myCredential.Password = "mypassword";

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    DataSourceCredentials[] myCredentials=null;

    if (reportdatasourcecollection.Count > 0)

    {

    myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

    }

    for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

    {

    ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

    myCredential.Name = datasourceinfo.Name;

    myCredentials[iIndex] = myCredential;

    }

    this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

    ...............................

    }

    |||

    Hi,

    I am facing the same problem.

    I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

    So what should be the Connection Methods in Shared DataSource?

    Nilesh

    |||

    Me too there's an error here.

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    any thoughts please?

    thanks.

    |||

    Ishwar,

    Thanks for the link. That is awesome. I got it working using the following code.

    ServerReport.ReportServerCredentials.NetworkCredentials

    = new NetworkCredential(properties.Username, properties.Password, properties.Domain);

    Credentials in Reporting Services?

    I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

    Is it possible?

    Any help will be appreciated!!!

    TIA

    YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

    prefix:datasourcename=value

    as the prefix is dsu (for user) or dsp (for password)

    HTH, Jens Suessmeyer.

    http://www.sqlserver2005.de

    |||

    Thanks for your reply Jens!!!

    But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

    |||Hi,
    Hope this could help you

    System.Net.CredentialCache myCache = new System.Net.CredentialCache();
    myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

    reportViewer.ShowCredentialPrompts = false;
    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
    reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
    reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
    reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
    reportViewer.PromptAreaCollapsed = false;
    reportViewer.RefreshReport();|||

    I am trying to use the example code provided for a simialr problem but the line (in VB)

    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

    always shows as read only. How do I get round this please?

    |||Hi ,
    I think your using report viewer web control ofr asp.net. I had same problem.
    Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


    But i hope this link could help you..

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

    If you found the way please post back here.


    Thanks & Best Regards|||

    I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

    I tried the following suggestion:

    reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

    reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

    reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

    CredentialCache cc = new CredentialCache();

    cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

    new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

    reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

    reportViewer1.ShowCredentialPrompts = false;

    reportViewer1.RefreshReport();

    ...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

    ReportingService rService = new ReportingService();

    rService.Credentials

    = new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

    CatalogItem[] catalogItems;

    catalogItems = rService.ListChildren("/", true);

    Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

    |||

    Hi Glenn,

    You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

    http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

    |||

    You can refer following link.

    http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

    |||

    Hi, you can try this, might help.

    I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

    network login user, I am using my application's user id and password to connect to datasource.

    By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

    It works for me.

    privatevoid Form1_Load(object sender, EventArgs e)

    {

    .............................

    Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

    myCredential.UserId = "myuserid";

    myCredential.Password = "mypassword";

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    DataSourceCredentials[] myCredentials=null;

    if (reportdatasourcecollection.Count > 0)

    {

    myCredentials = newDataSourceCredentials[reportdatasourcecollection.Count];

    }

    for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

    {

    ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

    myCredential.Name = datasourceinfo.Name;

    myCredentials[iIndex] = myCredential;

    }

    this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

    ...............................

    }

    |||

    Hi,

    I am facing the same problem.

    I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

    So what should be the Connection Methods in Shared DataSource?

    Nilesh

    |||

    Me too there's an error here.

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    any thoughts please?

    thanks.

    |||

    Ishwar,

    Thanks for the link. That is awesome. I got it working using the following code.

    ServerReport.ReportServerCredentials.NetworkCredentials

    = newNetworkCredential(properties.Username, properties.Password, properties.Domain);

    Credentials in Reporting Services?

    I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

    Is it possible?

    Any help will be appreciated!!!

    TIA

    YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

    prefix:datasourcename=value

    as the prefix is dsu (for user) or dsp (for password)

    HTH, Jens Suessmeyer.

    http://www.sqlserver2005.de

    |||

    Thanks for your reply Jens!!!

    But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

    |||Hi,
    Hope this could help you

    System.Net.CredentialCache myCache = new System.Net.CredentialCache();
    myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

    reportViewer.ShowCredentialPrompts = false;
    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
    reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
    reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
    reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
    reportViewer.PromptAreaCollapsed = false;
    reportViewer.RefreshReport();

    |||

    I am trying to use the example code provided for a simialr problem but the line (in VB)

    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

    always shows as read only. How do I get round this please?

    |||Hi ,
    I think your using report viewer web control ofr asp.net. I had same problem.
    Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


    But i hope this link could help you..

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

    If you found the way please post back here.


    Thanks & Best Regards|||

    I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

    I tried the following suggestion:

    reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

    reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

    reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

    CredentialCache cc = new CredentialCache();

    cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

    new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

    reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

    reportViewer1.ShowCredentialPrompts = false;

    reportViewer1.RefreshReport();

    ...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

    ReportingService rService = new ReportingService();

    rService.Credentials

    = new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

    CatalogItem[] catalogItems;

    catalogItems = rService.ListChildren("/", true);

    Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

    |||

    Hi Glenn,

    You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

    http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

    |||

    You can refer following link.

    http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

    |||

    Hi, you can try this, might help.

    I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

    network login user, I am using my application's user id and password to connect to datasource.

    By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

    It works for me.

    private void Form1_Load(object sender, EventArgs e)

    {

    .............................

    Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

    myCredential.UserId = "myuserid";

    myCredential.Password = "mypassword";

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    DataSourceCredentials[] myCredentials=null;

    if (reportdatasourcecollection.Count > 0)

    {

    myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

    }

    for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

    {

    ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

    myCredential.Name = datasourceinfo.Name;

    myCredentials[iIndex] = myCredential;

    }

    this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

    ...............................

    }

    |||

    Hi,

    I am facing the same problem.

    I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

    So what should be the Connection Methods in Shared DataSource?

    Nilesh

    |||

    Me too there's an error here.

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    any thoughts please?

    thanks.

    |||

    Ishwar,

    Thanks for the link. That is awesome. I got it working using the following code.

    ServerReport.ReportServerCredentials.NetworkCredentials

    = new NetworkCredential(properties.Username, properties.Password, properties.Domain);

    Credentials in Reporting Services?

    I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

    Is it possible?

    Any help will be appreciated!!!

    TIA

    YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

    prefix:datasourcename=value

    as the prefix is dsu (for user) or dsp (for password)

    HTH, Jens Suessmeyer.

    http://www.sqlserver2005.de

    |||

    Thanks for your reply Jens!!!

    But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

    |||Hi,
    Hope this could help you

    System.Net.CredentialCache myCache = new System.Net.CredentialCache();
    myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

    reportViewer.ShowCredentialPrompts = false;
    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
    reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
    reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
    reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
    reportViewer.PromptAreaCollapsed = false;
    reportViewer.RefreshReport();

    |||

    I am trying to use the example code provided for a simialr problem but the line (in VB)

    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

    always shows as read only. How do I get round this please?

    |||Hi ,
    I think your using report viewer web control ofr asp.net. I had same problem.
    Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


    But i hope this link could help you..

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

    If you found the way please post back here.


    Thanks & Best Regards|||

    I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

    I tried the following suggestion:

    reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

    reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

    reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

    CredentialCache cc = new CredentialCache();

    cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

    new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

    reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

    reportViewer1.ShowCredentialPrompts = false;

    reportViewer1.RefreshReport();

    ...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

    ReportingService rService = new ReportingService();

    rService.Credentials

    = new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

    CatalogItem[] catalogItems;

    catalogItems = rService.ListChildren("/", true);

    Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

    |||

    Hi Glenn,

    You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

    http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

    |||

    You can refer following link.

    http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

    |||

    Hi, you can try this, might help.

    I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

    network login user, I am using my application's user id and password to connect to datasource.

    By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

    It works for me.

    private void Form1_Load(object sender, EventArgs e)

    {

    .............................

    Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

    myCredential.UserId = "myuserid";

    myCredential.Password = "mypassword";

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    DataSourceCredentials[] myCredentials=null;

    if (reportdatasourcecollection.Count > 0)

    {

    myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

    }

    for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

    {

    ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

    myCredential.Name = datasourceinfo.Name;

    myCredentials[iIndex] = myCredential;

    }

    this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

    ...............................

    }

    |||

    Hi,

    I am facing the same problem.

    I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

    So what should be the Connection Methods in Shared DataSource?

    Nilesh

    |||

    Me too there's an error here.

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    any thoughts please?

    thanks.

    |||

    Ishwar,

    Thanks for the link. That is awesome. I got it working using the following code.

    ServerReport.ReportServerCredentials.NetworkCredentials

    = new NetworkCredential(properties.Username, properties.Password, properties.Domain);

    Credentials in Reporting Services?

    I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

    Is it possible?

    Any help will be appreciated!!!

    TIA

    YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

    prefix:datasourcename=value

    as the prefix is dsu (for user) or dsp (for password)

    HTH, Jens Suessmeyer.

    http://www.sqlserver2005.de

    |||

    Thanks for your reply Jens!!!

    But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

    |||Hi,
    Hope this could help you

    System.Net.CredentialCache myCache = new System.Net.CredentialCache();
    myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

    reportViewer.ShowCredentialPrompts = false;
    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
    reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
    reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
    reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
    reportViewer.PromptAreaCollapsed = false;
    reportViewer.RefreshReport();|||

    I am trying to use the example code provided for a simialr problem but the line (in VB)

    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

    always shows as read only. How do I get round this please?

    |||Hi ,
    I think your using report viewer web control ofr asp.net. I had same problem.
    Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


    But i hope this link could help you..

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

    If you found the way please post back here.


    Thanks & Best Regards|||

    I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

    I tried the following suggestion:

    reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

    reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

    reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

    CredentialCache cc = new CredentialCache();

    cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

    new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

    reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

    reportViewer1.ShowCredentialPrompts = false;

    reportViewer1.RefreshReport();

    ...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

    ReportingService rService = new ReportingService();

    rService.Credentials

    = new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

    CatalogItem[] catalogItems;

    catalogItems = rService.ListChildren("/", true);

    Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

    |||

    Hi Glenn,

    You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

    http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

    |||

    You can refer following link.

    http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

    |||

    Hi, you can try this, might help.

    I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

    network login user, I am using my application's user id and password to connect to datasource.

    By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

    It works for me.

    privatevoid Form1_Load(object sender, EventArgs e)

    {

    .............................

    Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

    myCredential.UserId = "myuserid";

    myCredential.Password = "mypassword";

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    DataSourceCredentials[] myCredentials=null;

    if (reportdatasourcecollection.Count > 0)

    {

    myCredentials = newDataSourceCredentials[reportdatasourcecollection.Count];

    }

    for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

    {

    ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

    myCredential.Name = datasourceinfo.Name;

    myCredentials[iIndex] = myCredential;

    }

    this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

    ...............................

    }

    |||

    Hi,

    I am facing the same problem.

    I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

    So what should be the Connection Methods in Shared DataSource?

    Nilesh

    |||

    Me too there's an error here.

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    any thoughts please?

    thanks.

    |||

    Ishwar,

    Thanks for the link. That is awesome. I got it working using the following code.

    ServerReport.ReportServerCredentials.NetworkCredentials

    = newNetworkCredential(properties.Username, properties.Password, properties.Domain);

    Credentials in Reporting Services?

    I have created several reports in SQL Server 2005 reporting services and I am viewing those reports in my C# application using a report viewer control. I want to pass the credentials for each report through my applications. I do not want to use any web service.

    Is it possible?

    Any help will be appreciated!!!

    TIA

    YOu can use the URL Parameters to pass the username and the password, look in the BOL for more information, the syntax for that is:

    prefix:datasourcename=value

    as the prefix is dsu (for user) or dsp (for password)

    HTH, Jens Suessmeyer.

    http://www.sqlserver2005.de

    |||

    Thanks for your reply Jens!!!

    But I am using a Report Viewer control in my application. How can I pass the username and password in this case?

    |||Hi,
    Hope this could help you

    System.Net.CredentialCache myCache = new System.Net.CredentialCache();
    myCache.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic", new System.Net.NetworkCredential("user", "pass"));

    reportViewer.ShowCredentialPrompts = false;
    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache;
    reportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
    reportViewer.ServerReport.ReportServerUrl ="http://localhost/reportserver";
    reportViewer.ServerReport.ReportPath = "/yourReportFolder/" + "yourReportName";
    reportViewer.PromptAreaCollapsed = false;
    reportViewer.RefreshReport();

    |||

    I am trying to use the example code provided for a simialr problem but the line (in VB)

    reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = myCache

    always shows as read only. How do I get round this please?

    |||Hi ,
    I think your using report viewer web control ofr asp.net. I had same problem.
    Its won't work for Microsoft.Reporting.WebForms.ReportViewer.


    But i hope this link could help you..

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=373983&SiteID=1

    If you found the way please post back here.


    Thanks & Best Regards|||

    I am attempting to secure my reports with Windows Authentication, but allow users of my application to access it from the www and supply credentials through my app. My app is a .Net 2.0 Windows SmartClient, and I am using the ReportViewer control.

    I tried the following suggestion:

    reportViewer1.ServerReport.ReportServerUrl = new Uri(_txtServer.Text);

    reportViewer1.ServerReport.ReportPath = _listBox.Items[_listBox.SelectedIndex].ToString();

    reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

    CredentialCache cc = new CredentialCache();

    cc.Add(new Uri("http://localhost/ReportServer/ReportService.asmx"), "Basic",

    new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text));

    reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = cc;

    reportViewer1.ShowCredentialPrompts = false;

    reportViewer1.RefreshReport();

    ...But I still get "The request failed with HTTP status 401: Access Denied." I am able to authenticate with the web service directly when requesting a list of available reports like this:

    ReportingService rService = new ReportingService();

    rService.Credentials

    = new NetworkCredential(_txtUsername.Text, _txtPassword.Text, _txtDomain.Text);

    CatalogItem[] catalogItems;

    catalogItems = rService.ListChildren("/", true);

    Why can I pass windows credentials to the web service directly, but not through the reportViewer call to reporting services? Any help would be very much appreciated!

    |||

    Hi Glenn,

    You might have got the solution for your problem, If not and/or for other developers who might visit this blog, please find the solution at following link. Actually you can get it work by setting ImpersonationUser instead of NetworkCredentials property.

    http://blogs.msdn.com/bimusings/archive/2005/11/05/489423.aspx

    |||

    You can refer following link.

    http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx

    |||

    Hi, you can try this, might help.

    I pass the datasource credential through ReportViewer. It is the acutal database login credential instead of a net work credential. So in my application, which login user has nothing to do with Windows

    network login user, I am using my application's user id and password to connect to datasource.

    By doing this way, I can view a report using diffirent user id/password as long as they exist in the actual database.

    It works for me.

    private void Form1_Load(object sender, EventArgs e)

    {

    .............................

    Microsoft.Reporting.WinForms.DataSourceCredentials myCredential = new Microsoft.Reporting.WinForms.DataSourceCredentials();

    myCredential.UserId = "myuserid";

    myCredential.Password = "mypassword";

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    DataSourceCredentials[] myCredentials=null;

    if (reportdatasourcecollection.Count > 0)

    {

    myCredentials = new DataSourceCredentials[reportdatasourcecollection.Count];

    }

    for (int iIndex = 0; iIndex < reportdatasourcecollection.Count; iIndex++)

    {

    ReportDataSourceInfo datasourceinfo = reportdatasourcecollection[iIndex];

    myCredential.Name = datasourceinfo.Name;

    myCredentials[iIndex] = myCredential;

    }

    this.reportViewer1.ServerReport.SetDataSourceCredentials( myCredentials );

    ...............................

    }

    |||

    Hi,

    I am facing the same problem.

    I used ReportDataSourceInfo then it gives error that DataSource doesnt support it. Error of rsdatasource

    So what should be the Connection Methods in Shared DataSource?

    Nilesh

    |||

    Me too there's an error here.

    ReportDataSourceInfoCollection reportdatasourcecollection = this.reportViewer1.ServerReport.GetDataSources();

    any thoughts please?

    thanks.

    |||

    Ishwar,

    Thanks for the link. That is awesome. I got it working using the following code.

    ServerReport.ReportServerCredentials.NetworkCredentials

    = new NetworkCredential(properties.Username, properties.Password, properties.Domain);