Crystal reports asking for database login credentials RRS feed

  • Question

  • C# 2010

    Windows 7

    Crystal Report 13 (For Visual Studio 2010)

    All users all in the same domain and have the same permission to the report location (Read & Execute, Listfolder content, Read)


    Hi There,

    I know a lot of people talk about this subject, but my problem is different

    I use the code below to show the report and set the database credentials:

    CrystalDecisions.Shared.ConnectionInfo CrInfo = new CrystalDecisions.Shared.ConnectionInfo();
                CrInfo.ServerName = ID_Sever;
                CrInfo.UserID = ID_UserName;
                CrInfo.Password = ID_UserPass;
                CrInfo.DatabaseName = ID_Database;
                System.IO.FileInfo ReportFinder = new System.IO.FileInfo(ID_ReportLocation + @"\" + ReportName);
                crystalReportViewer1.ReportSource = ReportPath;
                CrystalDecisions.CrystalReports.Engine.ReportDocument r = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
                crystalReportViewer1.ReportSource = r;
    private void SetLogin(ConnectionInfo connectionInfo)
                TbLogOninfos = crystalReportViewer1.LogOnInfo;
                foreach (TableLogOnInfo TblogOninfos in TbLogOninfos)
                    TblogOninfos.ConnectionInfo = connectionInfo;

    it works on my computer (it does not ask log-in credential) when I am running the application

    I checked it on a laptop as well with other users log-in and it works as well. (it does not ask log-in credential)

    But when I try to run the application from their computer (same users) crystal reports asks for database log-in credential.

    I have no idea, why it is working on some computers and does not work in others?

    Any idea?


    Friday, May 4, 2012 7:31 PM