Kalanamith
Kalanamith

Reputation: 20648

HOw to remove SSRS section to ask credentials

enter image description here

How to remove this prompt when viewing SSRS report in ASP.net Can we pass these as two parameters?

Upvotes: 0

Views: 2695

Answers (2)

QuiOui
QuiOui

Reputation: 125

You could also programmatically set the credentials of the data sources using the ReportViewer.ServerReport.SetDatasourceCredentials method. e.g.

    // Set credentials
    DataSourceCredentials cred = new DataSourceCredentials();
    ReportDataSourceInfoCollection dataSource = this.ReportViewer.ServerReport.GetDataSources();
    cred.Name = dataSource.First().Name;
    cred.UserId = "userid";
    cred.Password = "password";
    this.ReportViewer.ServerReport.SetDataSourceCredentials(new DataSourceCredentials[] { cred });
    this.ReportViewer.ServerReport.Refresh();

    // Hide credential prompt
    ReportViewer.ShowCredentialPrompts = false;

Upvotes: 0

Alexey
Alexey

Reputation: 1539

The answer would depend on what kind of data provider you have. Assuming this is an MS SQL data provider:

  • Go to the SSRS Report Manager, find your data source and open its properties.

  • Then, depending on the authentification method set up in your SQL server and the database, set the appropriate parameters:

    "(o) Credentials stored securely in the report server" - if your server/database require the authorization and you want to provide the user name and password

    "[x] Use as Windows credentials when connecting to the data source" - check this checkbox if your server/database configured for windows authentification, otherwise leave it unchecked.

    "( ) Windows integrated security" - select this option if you'd like to use the current windows credentials of the report user

    "( ) Credentials are not required" - in case if your data provider and data source don't require the authorization (which is unlikely though)

Hope it helps.


Best regards,

Alexey

www.kudinov.ru

Upvotes: 1

Related Questions