我正在尝试在ActiveReport
. 但截面高度限制为 2 英寸。它只需要 (2/0.2 = )10 个项目。我希望该部分随着内容的增加而增加其高度,以便它可以采用所有项目。似乎.CanGrow
不起作用。我正在使用的代码如下。
Dim lObjSecRpt As New GrapeCity.ActiveReports.SectionReport()
Dim lObjLbl As New GrapeCity.ActiveReports.SectionReportModel.Label()
Dim c As Single = 0.2F
Try
lObjSecRpt.Sections.InsertPageHF()
lObjSecRpt.Sections(0).BackColor = Color.WhiteSmoke
lObjSecRpt.Sections(0).Height = 0.0F
lObjSecRpt.Sections.Insert(1, New GrapeCity.ActiveReports.SectionReportModel.Detail())
lObjSecRpt.Sections(1).BackColor = Color.WhiteSmoke
lObjSecRpt.Sections(1).CanGrow = True
For Each dr As DataRow In mObjDtReport.Rows
lObjLbl = New GrapeCity.ActiveReports.SectionReportModel.Label()
lObjLbl.Alignment = GrapeCity.ActiveReports.Document.Section.TextAlignment.Left
lObjLbl.Font = New System.Drawing.Font("Arial", 10, FontStyle.Regular)
lObjLbl.Location = New PointF(0.0F, c)
lObjLbl.Height = 0.2F
lObjLbl.Width = 1.0F
lObjLbl.Text = CStr(dr("RptObjNam"))
lObjSecRpt.Sections(1).Controls.Add(lObjLbl)
c += c
Next
Me.rptViewer.LoadDocument(lObjSecRpt)