Getting error: Cannot create a connection to data source RRS feed

  • Question

  • User1821422792 posted

    Hi,  Would appreciate if any input on this error......

    I am using sql 2008 r2 with enterprise ssrs.  the report server is not local and it 's name is "myServer".

    I am able to run the reports on BI application.  However, when I run the reports under web site,

    I get this error:



    • An error has occurred during report processing.
    • Cannot create a connection to data source 'myServer'.
    • For more information about this error navigate to the report server on the local server machine, or enable remote errors

    Tuesday, February 14, 2012 2:38 PM

All replies

  • User-1226263862 posted

    In your SSRS report make sure you have your dataset connection string make sure you define a username and password so the report knows how to connect otherwise I believe it uses the IIS process username to try to connect.

    Tuesday, February 14, 2012 3:16 PM
  • User1821422792 posted

    Thanks for the reply.  Userid and password do not resolve the error issue.


    Tuesday, February 14, 2012 3:32 PM
  • User-1226263862 posted

    Then do as the error states and enable remote errors or the simpler thing to do would be to log into the server hosting the website and run the application to see what the detailed error is.  Probably give you exactly what you need to fix the problem.

    Tuesday, February 14, 2012 4:06 PM
  • User1821422792 posted

    Thanks for the suggestion.  The issue here is report server and sql db is on server 1 while the web site is on server 2.  Do you know any

    web.config parameter set up?  Have set up the server path and server name.


    Tuesday, February 14, 2012 5:37 PM
  • User-1226263862 posted

    Thats fine, go to server 2 and it should display the error for you.  Can always look at the server event logs and/or the SQL logs as well.

    Tuesday, February 14, 2012 9:18 PM
  • User-8475372 posted

    Dear User,

    Are you passing the credentials to the report via the code on your application ? 

    Please check with that once..

    Just in Case : 

    Microsoft.Reporting.WebForms.ReportParameter[] RptParameters;


                reportViewer.ServerReport.ReportServerUrl = new System.Uri(ConfigurationManager.AppSettings["ReportServerURL"]);

                reportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;

                reportViewer.ToolBarItemBorderColor = System.Drawing.Color.PowderBlue;

                reportViewer.ToolBarItemBorderStyle = BorderStyle.Double;


                string strUserName = ConfigurationManager.AppSettings["UserName"].ToString();

                string strPassword = ConfigurationManager.AppSettings["Password"].ToString();

                string strDomain = ConfigurationManager.AppSettings["Domain"].ToString();

                reportViewer.ServerReport.ReportServerCredentials = new ReportCredentials(strUserName, strPassword, strDomain);

                string strReport = string.Empty;

                strReport = ConfigurationManager.AppSettings["ReportsFolder"] + Request.QueryString["ReportName"].ToString();

    Tuesday, February 14, 2012 11:41 PM
  • User1821422792 posted


    Thanks for your suggestion.  I have

    on the form:
    <rsweb:ReportViewer ID="rptViewer" runat="server"






    height="500px" ShowBackButton="True" Width="1200px" ZoomMode="PageWidth" >


    on the code behind:

    Me.rptViewer.ServerReport.ReportPath = System.Configuration.ConfigurationManager.AppSettings("ReportPath") & Trim(strRptName)

    Me.rptViewer.ServerReport.ReportServerUrl = New Uri(System.Configuration.ConfigurationManager.AppSettings("ReportServer"))



    on web config

    <add key="ReportServer" value="http://serverName/ReportServer/"/>

    <add key="ReportPath" value="/PathReports/"/>


    I donot need credential at this point since this is a test server.  Somehow when it gets to the report server, it does not recognise the login and password calling from the web server.  How do you pass the necessary information to the report server? 



    Wednesday, February 15, 2012 2:09 PM
  • User-1226263862 posted

    I'm guessing what Srikanth Kasturi is saying is doesn't matter if you are on test or not, specify those credentials and it should work. 

    You are dealing with 2 different accounts (and you need both):

    1. User account to access the database via the SSRS report (dataset) which you should have defined in the SSRS report
    2. User account given access to run the SSRS report.  In this case if you don't specify that account it will, by default, use the account running IIS.  In your case the test server may have access to run against the test SSRS or live SSRS server which is why it is working.


    Wednesday, February 15, 2012 2:32 PM
  • User1821422792 posted

    Thanks all.  Resolve this after modify the access right on sql server to allow this machine to access the db.



    Wednesday, February 15, 2012 3:18 PM