Thursday, March 29, 2012

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<

No comments:

Post a Comment