关于DataReport的小问题!
1.我在页标头(Section2)中放了rptLabel.在细节(Section1)中放了rtpTextBox,但不知为什么跑表的时候,rptlabel 的下边和上边总不能紧贴着,有很宽的空。代码页下:
Dim mCtllab As RptLabel
For Each mCtllab In .Sections("Section2").Controls
If mCtllab.Name <> "labTile" Then
mCtllab.Alignment = rptJustifyCenter
mCtllab.BorderStyle = rptBSSolid'有边框
'mCtllab.Top = 1005 - 300
‘其中1005为section2的Height,300为rtplabel的height.
End If
Next mCtllab
Dim mCtltab As RptTextBox
For Each mCtltab In .Sections("Section1").Controls
mCtltab.Alignment = rptJustifyCenter
mCtltab.BorderStyle = rptBSSolid'有边框
mCtltab.Top = 0
Next mCtltab
-----------------------------------
2.怎么能得到当前纸张的宽度值 ,好让rptLabel,rptTextBox自动变化宽度来适应不同纸张的报表,(省着老出现“报表宽度>纸张宽度这样了提示”.这样用户改变了纸张类型,横纵也不怕了!)这大家可能都碰到过吧,不知你们是怎么解决的。