登录失败。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: CrystalDecisions.CrystalReports.Engine.LogOnException: 登录失败。我用的是vs2003+sql server2000.试过好多方法也解决不了..等高手来指点..

解决方案 »

  1.   

    一定是你的方法有問題。
    你的載載報表函數是怎麼寫的
    如下可供參考
    private void Getsource()
        {
            reportDoc = new ReportDocument();
            reportDoc.Load(Server.MapPath("../b2b_Rpt/rpt_JcOrder.rpt"));
            reportDoc.SetDataSource(SqlHaper.GetDataSet(Session["Jc_order"].ToString().Trim()));
            CrystalReportViewer1.ReportSource = reportDoc;
            CrystalReportViewer1.DataBind();
        }
      

  2.   

    我的代码如下:                                string reportName = "crpt1.rpt";
    ReportDocument report;
    report = new ReportDocument();
    string path = Server.MapPath(reportName);
    report.Load(path);
    TableLogOnInfo logon = new TableLogOnInfo();
    logon.ConnectionInfo.ServerName = "HULONG";
    logon.ConnectionInfo.DatabaseName = "project_sms";
    logon.ConnectionInfo.UserID = "sa";
    logon.ConnectionInfo.Password = "yestoday";
    report.Database.Tables[0].ApplyLogOnInfo(logon);
    report.Refresh();
    this.CrystalReportViewer1.ReportSource = report;
    this.CrystalReportViewer1.DataBind();