Private Sub RunBySize(IsPreview As Boolean)
'求得用报表使用的计量单位表示的纸张尺寸值
Dim Width As Double
Dim Length As Double
Width = CDbl(txtWidth.Text)
Length = CDbl(txtLength.Text)
If (Report.Unit = grmuInch) Then
Width = Width / 2.54
Length = Length / 2.54
End If
Report.Printer.PrinterName = "aaaa"
'256代表自定义纸张
'Report.Printer.PaperSize = 256
'Report.Printer.PaperWidth = Width
'Report.Printer.PaperLength = Length
'If ckLandScape.Value Then
'Report.Printer.PaperOrientation = grpoLandscape
'Else
'Report.Printer.PaperOrientation = grpoPortrait
'End If
Report.PrintAsDesignPaper = True
Report.PrintToStretch = False
Report.DesignPaperSize = 256
Report.DesignPaperWidth = Width
Report.DesignPaperLength = Length
If ckLandScape.Value Then
Report.DesignPaperOrientation = grpoLandscape
Else
Report.DesignPaperOrientation = grpoPortrait
End If
If IsPreview Then
Report.PrintPreview True
Else
Report.[Print] False
End If
End Sub
1、双击打开FineReport报表设计工具,新建一个数据库查询,使用S订单表产生查询SQL语句。2、打开新建的数据库查询,依次将需要字段拖到普通报表上,添加报表表头。
3、设置完毕之后,保存文件并在浏览器中预览报表效果。
4、返回到报表设计器,找到模板工具,选择移动端属性,打开界面。
5、可以进行模板设置,选择4.7寸屏幕手机(适配、放大和缩小)。横屏和竖屏的自适应,工具栏html5报表缩放和刷新。
6、设置完毕后点击确定按钮,然后设置报表表头背景色和报表间隔色。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)