【问题标题】:The 'DisplayGroupTree' property cannot be set declaratively不能以声明方式设置“DisplayGroupTree”属性
【发布时间】:2018-03-14 03:45:49
【问题描述】:

在下面的这段代码中,我收到一条错误消息“不能以声明方式设置‘DisplayGroupTree’属性。”这发生在我为 Visual Studio 2015 安装 SAP Crystal Report 之后。

<CR:CrystalReportViewer ID="CrvDisplay" runat="server" AutoDataBind="true" DisplayGroupTree="False"
        ReuseParameterValuesOnRefresh="True" EnableDatabaseLogonPrompt="false" EnableParameterPrompt="false" />

如果我删除 DisplayGroupTree="False" 那么我不会收到此错误...下面附上屏幕截图

![ Error Missing parameter values.]1

protected void Page_Init(object sender, EventArgs e)
        {
            ConfigureCrystalReports();
        }
        private void ConfigureCrystalReports()
        {



            ReportDocument cryRpt = new ReportDocument();
            TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
            TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
            ConnectionInfo crConnectionInfo = new ConnectionInfo();
            Tables CrTables;
            cryRpt.Load(Server.MapPath(Session["Reportname"].ToString()));
            //DB Connection Start
            string Server1 = ConfigurationManager.AppSettings["Server"];
            string user = ConfigurationManager.AppSettings["Userid"];
            string Password = ConfigurationManager.AppSettings["Password"];
            string DataBase = ConfigurationManager.AppSettings["DataBase"];
            crConnectionInfo.ServerName = Server1;
            crConnectionInfo.DatabaseName = DataBase;
            crConnectionInfo.UserID = user;
            crConnectionInfo.Password = Password;

            ////Parameter setting Start
            ParameterDiscreteValue pmtDiscValue1 = new ParameterDiscreteValue();
            pmtDiscValue1.Value = Session["LowerboundDate"];
            cryRpt.ParameterFields["LowerboundDate"].CurrentValues.Add(pmtDiscValue1);

            ParameterDiscreteValue pmtDiscValue2 = new ParameterDiscreteValue();
            pmtDiscValue2.Value = Session["UpperboundDate"];
            cryRpt.ParameterFields["UpperboundDate"].CurrentValues.Add(pmtDiscValue2);

            ////Parameter setting End

            CrTables = cryRpt.Database.Tables;
            foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
            {
                crtableLogoninfo = CrTable.LogOnInfo;
                crtableLogoninfo.ConnectionInfo = crConnectionInfo;
                CrTable.ApplyLogOnInfo(crtableLogoninfo);
            }

            CrvDisplay.SelectionFormula = Session["selectionformula"].ToString();
            CrvDisplay.ReportSource = cryRpt;
            CrvDisplay.RefreshReport();
        }

【问题讨论】:

标签: c# visual-studio-2012 crystal-reports crystal-reports-2008 crystal-reports-2010


【解决方案1】:

正如@jambonick 所说,该命令已过时

尝试使用

YOURReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;

【讨论】:

    猜你喜欢
    • 2011-08-29
    • 2014-07-29
    • 1970-01-01
    • 1970-01-01
    • 2018-09-21
    • 2011-01-03
    • 1970-01-01
    • 2011-01-13
    相关资源
    最近更新 更多