专业报表里面可以参照下面的进行定义,但是只是定义,不能直接设置为默认的。
Dim doc As New PrintDoc
Dim rg As prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Dim dr As Row=Tables("打印机").Current
doc.PageSetting.Width = val(dr("设置宽度"))
doc.PageSetting.Height = val(dr("设置高度") )
doc.PageSetting.LeftMargin=val(dr("左边距") )
doc.PageSetting.RightMargin=val(dr("右边距") )
doc.PageSetting.TopMargin=val(dr("上边距") )
doc.PageSetting.BottomMargin=val(dr("下边距") )
Doc.PrinterName = dr("打印机名称")
'Dim xz As String = dr("是否旋转")
doc.AutoRotate = dr("是否旋转")
doc.PageSetting.Landscape=dr("是否横向")
Bar.Symbology = Barpro.Symbology.QRCode
Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight