ASP.NET。具有 CrystalDecisions.Web,版本 = 13.0.2000.0 CrystalReportsViewer 的 Web 表单。
我想隐藏/禁用包含组树按钮的 LH 窗格。
DisplayGroupTree 属性被标记为已过时且无效。
我设置了 ToolPanelView="None" 也没有效果。
早期版本中存在组树问题的隐藏,但据我所知,已发布的答案不起作用或转换为该版本。
也许我正在构建错误的报告。(显示正常)。
private void ShowReport(MyClassLibrary.Report report)
{
ConnectionInfo cn = new ConnectionInfo();
cn.ServerName = "MyServer";
cn.DatabaseName = "MyDatabase";
cn.UserID = "myUser";
cn.Password = "myPassword";
string reportDirectory = Server.MapPath(".") + "\\Reports\\";
CrystalReportSource rs = new CrystalReportSource();
Session["CurrentReportSource"] = rs;
CrystalDecisions.Web.Report r = new CrystalDecisions.Web.Report();
r.FileName = reportDirectory + report.reportPath;
rs.Report = r;
CRV.ReportSource = rs;
ParameterFields p = CRV.ParameterFieldInfo;
ParameterField pUserId = new ParameterField();
pUserId.Name = "@user_id";
ParameterField pStartDate = new ParameterField();
pStartDate.Name = "@start_date";
ParameterField pEndDate = new ParameterField();
pEndDate.Name = "@end_date";
ParameterDiscreteValue pUserIdValue = new ParameterDiscreteValue();
ParameterDiscreteValue pStartDateValue = new ParameterDiscreteValue();
ParameterDiscreteValue pEndDateValue = new ParameterDiscreteValue();
TimeSpan t = new TimeSpan(30, 0, 0, 0);
DateTime startDate = DateTime.Today - t;
DateTime endDate = DateTime.Now;
//**LIVE CODE***
//CouponUser user = (CouponUser) Session["CurrentUser"];
//pUserId_Value.Value = user.userId;
//***TEST CODE***
pUserIdValue.Value = 2;
//********
pStartDateValue.Value = startDate;
pEndDateValue.Value = endDate;
pUserId.CurrentValues.Add(pUserIdValue);
pStartDate.CurrentValues.Add(pStartDateValue);
pEndDate.CurrentValues.Add(pEndDateValue);
p.Add(pUserId);
p.Add(pStartDate);
p.Add(pEndDate);
foreach (TableLogOnInfo logOnInfo in CRV.LogOnInfo)
{
logOnInfo.ConnectionInfo = cn;
}
rs.DataBind();
}