我是B/s模式下用.net自带的水晶报表,急啊

解决方案 »

  1.   

    推模式是生成结果集后推进去
    设计的时候把字段选好,然后按照这个字段推结果集就成了
    和GRIDVIEW有点相似
      

  2.   

    我就是推进去了,但是总是出现登陆失败异常。我用的是oracle数据库呀
      

  3.   

            #region 解决登陆错误问题!
            TableLogOnInfo logonInfo = new TableLogOnInfo();
            foreach (CrystalDecisions.CrystalReports.Engine.Table tb in ReportDoc.Database.Tables)
            {
                logonInfo = tb.LogOnInfo;
                logonInfo.ConnectionInfo.ServerName = "(local)";
                logonInfo.ConnectionInfo.DatabaseName = "text1";//
                logonInfo.ConnectionInfo.UserID = "sa";
                logonInfo.ConnectionInfo.Password = "";//
                tb.ApplyLogOnInfo(logonInfo);        }
            #endregion
      

  4.   

    谢谢!这些方法都试过了!还是不行,我连接的是oracle!
      

  5.   

    试试这个方法,也是介绍.net 连oracle ,登录的问题:1. load the report using ReportDocument.Load() method2. Use setdatabaselogon on the report doc object and just specify the user name, and password. DOnt use the overload that specifies all four, i.e. user, pasword, database and server. Those who get this error, would be using this overload.3. dont set any table level logon properties after this.4. Specify parameter values using the report object report.setparametervalue('parm', val, 'subreportname'); if you are specifying a parameter for your main report, use main report object setparametervalue overload that takes only the parm and the value and not the sub report name5. Export your report to disk/wherever you want using the export methods. (actually this is where you will get your logon failure errors) with the above steps, you should be able to get rid of the logon failure error!
      

  6.   

    用ODBC也一样提示登陆失败的错误,看来不行