1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > 【Crystal Reports 水晶报表】奇偶行显示不同的颜色 另附CrystalReports常用属性

【Crystal Reports 水晶报表】奇偶行显示不同的颜色 另附CrystalReports常用属性

时间:2021-10-19 03:22:53

相关推荐

【Crystal Reports 水晶报表】奇偶行显示不同的颜色    另附CrystalReports常用属性

step1

选择👉节专家👉详细👉颜色,👇

step2

点击第三步的编辑,👇

step3

编程:

If RecordNumber Mod 2 = 0 then crSilver Else crNoColor

OVER

常用属性

1、常用属性及方法//常用属性CrystalReportViewer1.HasToggleGroupTreeButton = true;//显示或隐藏工具栏上组树按钮CrystalReportViewer1.HasExportButton = true;//显示或隐藏工具栏上导出按钮CrystalReportViewer1.HasPrintButton = true;//显示或隐藏工具栏上打印按钮CrystalReportViewer1.HasViewList = true;//显示或隐藏工具栏上视图列表(主报表)CrystalReportViewer1.HasDrillUpButton = true;//获取或设置浅化按钮可见性(向上)CrystalReportViewer1.HasPageNavigationButtons = true;//显示或隐藏工具栏上导航按钮CrystalReportViewer1.HasGotoPageButton = true;//显示或隐藏工具栏上跳转按钮CrystalReportViewer1.HasSearchButton = true;//显示或隐藏工具栏上搜索按钮CrystalReportViewer1.HasZoomFactorList = true;//显示或隐藏工具栏上缩放按钮CrystalReportViewer1.HasCrystalLogo = true;//显示或隐藏工具栏上LOGOCrystalReportViewer1.SelectionFormula = "{Customer.Last Year's Sales} > 11000.00 " + "AND Mid({Customer.Customer Name}, 1, 1) = "A"";//筛选公式CrystalReportViewer1.DisplayToolbar = true;//显示或隐藏工具栏CrystalReportViewer1.DisplayGroupTree = true;//显示或隐藏组树CrystalReportViewer1.DisplayPage = true;//显示或隐藏页面视图CrystalReportViewer1.SeparatePages = true;//获取或设置报表页是分开还是连接?CrystalReportViewer1.BorderWidth = Convert.ToInt32("borderWidth");//设置边框宽度//常用方法CrystalReportViewer1.ShowNthPage(Convert.ToInt32("pageNumber"));//跳转页CrystalReportViewer1.Zoom(Convert.ToInt32("zoomFactor"));//缩放2、登陆验证private void ConfigureCrystalReports(){ConnectionInfo connectionInfo = new ConnectionInfo();connectionInfo.ServerName = ".";connectionInfo.DatabaseName = "Northwind";connectionInfo.UserID = "sa";connectionInfo.Password = "";string reportPath = Server.MapPath("NorthwindCustomers.rpt");crystalReportViewer.ReportSource = reportPath;SetDBLogonForReport(connectionInfo);}private void Page_Init(object sender, EventArgs e){ConfigureCrystalReports();}private void SetDBLogonForReport(ConnectionInfo connectionInfo){TableLogOnInfos tableLogOnInfos = crystalReportViewer.LogOnInfo;foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos){tableLogOnInfo.ConnectionInfo = connectionInfo;}}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。