VB6 DataReport打印自定义纸张

前端之家收集整理的这篇文章主要介绍了VB6 DataReport打印自定义纸张前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

修改报表打印的纸张大小时可选方案!

Private Sub DataReport_Initialize()

With Me
.Orientation = rptOrientPortrait '报表纵向打印
.ReportWidth = 14 * 567 '宽度 567 = 1cm  这儿还是报错的话可以设置成13.9 * 567
.LeftMargin = 0        '边距
.RightMargin = 0
End With
'左边距+右边距+报表宽度 <= 纸张宽度
Dim rst As New ADODB.Recordset
Dim sql As String
ConnDB
sql = "select * from Clients"
rst.Open sql,conn,adOpenKeyset,adLockReadOnly
Set Me.DataSource = rst

End Sub

猜你在找的VB相关文章