Dolen

导航

FastReport代码计算高度

Dim iHeight As Double 
      Dim columnData_form As DataSourceBase
     
      iHeight=Page1.TopMargin
      columnData_form=Report.GetDataSource("rpt_PurInDepart_Detail")
      columnData_form.Init
      For i As Integer =1 To iSelectRows
        iHeight=iHeight+Data1.Height/37.8*10
        iHeight=iHeight+DataFooter1.Height/37.8*10 
      Next
      iHeight=iHeight+Data2.Height/37.8*10*columnData_form.RowCount
      iHeight=iHeight+Page1.BottomMargin 
      Page1.PaperHeight=iHeight

posted on 2015-12-23 16:01  Dolen  阅读(644)  评论(0编辑  收藏  举报