For i As Integer=0 To Tables("表D").rows.count-1 rt = New prt.RenderText() '创建文本对象 Dim r As Row=Tables("表D").rows(i) rt.Text = R(c.name.replace("子表_","")) '设置文本对象的内容 rt.Width = "Auto" '自动设置宽度 rt.x = val(dr(c.name).split(",")(0)) * 10 + 20 '指定水平位置 rt.y= (val(dr(c.name).split(",")(1))+i) * 10 + 20 '指定垂直位置 ' MessageBox.Show((val(dr(c.name).split(",")(1))+i) * 10) ' rt.Style.Borders.All = New prt.Linedef(0.3, Color.Red) '设置边框 n=val(dr(c.name).split(",")(2)) rt.Style.Font = New Font("宋体", n , FontStyle.Bold) '设置文本对象的字体 doc.Body.Children.Add(rt) '将文本对象加入到报表 Next
|