以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]专业报表的排列方式问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=148129) |
-- 作者:wangyinming -- 发布时间:2020/3/31 16:47:00 -- [求助]专业报表的排列方式问题 报表已经做完,但是打印1张的话,用一张A5太浪费了,想最多排4张。 如果要打印3张,就在A5排3张,最多排4张。就如图显示预览。 打印的张数,如第1张,显示① 看了这个,但是不知道加哪里?请各位指导一下。 http://www.foxtable.com/help/index.htm?page=1542.htm [此贴子已经被作者于2020/3/31 20:54:25编辑过]
|
-- 作者:有点蓝 -- 发布时间:2020/3/31 16:59:00 -- 参考:http://www.foxtable.com/webhelp/topics/1219.htm |
-- 作者:wangyinming -- 发布时间:2020/3/31 17:17:00 -- 老师,用窗口的textbox7的值,设定张数,错误 \'\'\' Dim doc As New PrintDoc() \'定义一个报表 doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight \'设置排列方式 doc.PageSetting.PaperKind = 11 \'纸张类型改为A5 Doc.PageSetting.LeftMargin = 1 \'设置左边距 Doc.PageSetting.RightMargin = 1 \'设置右边距 Doc.PageSetting.TopMargin = 1 \'设置上边距 Doc.PageSetting.BottomMargin = 1 \'设置下边距 For i As Integer = e.form.controls("textbox7").text \'设置份数\' |
-- 作者:有点蓝 -- 发布时间:2020/3/31 17:26:00 -- dim k as integer= val(e.form.controls("textbox7").text) For i As Integer = 1 to k
|
-- 作者:wangyinming -- 发布时间:2020/3/31 17:36:00 -- 水印没有跟着变啊,可以多张吗? 不可以的话还有什么可以变通的办法呢? 另外打印的张数,如第1张,显示① 设置水印 rx = New prt.RenderText \'设置文本对象的内容 rx.Text = CurRow("背番号") \'设置文本内容 rx.Width = 80 \'宽度 rx.Height = 50 \'高度 rx.x = 20 ’固定位置 rx.y = 23 不知道怎么改? rx.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中对齐 rx.Style.TextAlignVert = prt.AlignVertEnum.Center \'垂直居中对齐 rx.Style.FontSize = 110 \'字体大小为110磅 rx.Style.FontBold = True \'字体加粗 rx.Style.TextColor = Color.LightGray \'文本颜色为灰色 Doc.WaterMark = rx \'作为水印使用 [此贴子已经被作者于2020/3/31 19:11:31编辑过]
|
-- 作者:程兴刚 -- 发布时间:2020/3/31 17:58:00 -- 您的问题,不知道设置分栏打印对您有没有用: Doc.Columns.Add() \'增加第一栏 Doc.Columns.Add() \'增加第二栏 Doc.Columns(0).Width = 60 \'第一栏的宽度为60毫米 Doc.Columns(0).Spacing = 1 \'栏间距1毫米 |
-- 作者:wangyinming -- 发布时间:2020/3/31 18:37:00 -- 分了2栏,还是一样?是不是我哪里错了? \'\'\' Dim doc As New PrintDoc() \'定义一个报表 doc.PageSetting.PaperKind = 11 \'纸张类型改为A5 Doc.PageSetting.LeftMargin = 1 \'设置左边距 Doc.PageSetting.RightMargin = 1 \'设置右边距 Doc.PageSetting.TopMargin = 1 \'设置上边距 Doc.PageSetting.BottomMargin = 1 \'设置下边距 Doc.Columns.Add() \'增加第一栏 Doc.Columns.Add() \'增加第二栏 Doc.Columns(0).Width = 101 \'第一栏的宽度为101毫米 Doc.Columns(0).Spacing = 10 \'栏间距1毫米 Dim k As Integer= val(e.form.controls("textbox7").text) For i As Integer = 1 To k Dim rt As New prt.RenderTable() \'定义一个表格对象 Dim rx As prt.RenderText \'定义一个文本对象 Dim CurRow As Row = Tables("printA5").Current \'设置水印 rx = New prt.RenderText \'设置文本对象的内容 rx.Text = CurRow("背番号") \'设置文本内容 rx.Width = 80 \'宽度 rx.Height = 50 \'高度 rx.x = 20 rx.y = 23 \'rx.Style.TextAngle = 45 \'旋转45度 rx.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中对齐 rx.Style.TextAlignVert = prt.AlignVertEnum.Center \'垂直居中对齐 rx.Style.FontSize = 110 \'字体大小为110磅 rx.Style.FontBold = True \'字体加粗 rx.Style.TextColor = Color.LightGray \'文本颜色为灰色 Doc.WaterMark = rx \'作为水印使用 |
-- 作者:wangyinming -- 发布时间:2020/3/31 20:54:00 -- 现在换了个思路,先保存临时图片,让后在重新做个分栏报表,但是想问一下上下图片的间隔怎么调整的? 没有看到帮助内容。 Dim doc1 As New PrintDoc \'定义一个报表对象 doc1.PageSetting.PaperKind = 11 \'纸张类型改为A5 Doc1.PageSetting.LeftMargin = 2 \'设置左边距 Doc1.PageSetting.TopMargin = 1 \'设置上边距 doc1.Stacking = prt.StackingRulesEnum.InlineLeftToRight \'设置排列方式 \'Dim s As String \'定义字符变量 Doc1.Columns.Add() \'增加第一栏 Doc1.Columns.Add() \'增加第二栏 Doc1.Columns(0).Width = 102 \'第一栏的宽度为60毫米 Doc1.Columns(0).Spacing = 3 \'栏间距1毫米 Dim k As Integer= val(e.form.controls("textbox7").text) For i As Integer = 1 To k Dim ro As New prt.RenderImage \'定义一个图片对象 ro.Image = GetImage(ProjectPath & "\\Images\\临时_page1.jpg" ) \'设置图片 ro.Style.ImageAlign.StretchVert = False \'禁止垂直方向扩展图片 ro.Width = "100" \'宽度等于页面宽度 ro.Height = "70" \'高度由图片大小自动决定 ro.Style.ImageAlign.StretchHorz = False \'禁止图片水平拉伸 ro.SplitVertBehavior = prt.SplitBehaviorEnum.Never \'避免垂直换页的时候,表格被分割成两部分. doc1.Body.Children.Add(ro) \'将图片对象加入报表 doc1.PageSetting.Landscape = True \'横向打印 Next doc1.Preview() \'预览 |
-- 作者:有点蓝 -- 发布时间:2020/3/31 21:02:00 -- 比如 Dim doc As New PrintDoc \'定义一个报表 doc.PageSetting.Width = 100 \'纸张宽度为100毫米 doc.PageSetting.Height = 70 \'纸张高度为90毫米 Doc.PageSetting.LeftMargin = 1 \'设置左边距 Doc.PageSetting.RightMargin = 1 \'设置右边距 Doc.PageSetting.TopMargin = 1 \'设置上边距 Doc.PageSetting.BottomMargin = 1 \'设置下边距 doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight \'设置排列方式 For i As Integer = 1 To 4 Dim rt As New prt.RenderTable() \'定义一个表格对象 rt.Style.GridLines.All = New prt.LineDef \'将网格线类型设为默认类型 rt.Width = 48 \'表格宽度为50mm rt.Height = 33 rt.Style.Spacing.All = 2 \'和其他对象之间的间隔为2mm \'rt.SplitVertBehavior = prt.SplitBehaviorEnum.Never \'避免垂直换页的时候,表格被分割成两部分. rt.Cols(0).Width = 20 rt.cells(0,0).Text = "姓名" rt.Cells(0,1).Text = "黄财德" rt.Cells(1,0).Text = "职务" rt.Cells(1,1).Text = "总经理" rt.Cells(2,0).Text= "工号" rt.cells(2,1).Text = "44081996008" doc.Body.Children.Add(rt) \'将表格对象加入到报表中 Next Dim rt2 As prt.RenderText Dim ra As New prt.RenderArea \'设置水印 rt2 = New prt.RenderText \'设置文本对象的内容 rt2.Text = "第一张" \'设置文本内容 rt2.Width = "40" \'宽度等于页面宽度 rt2.Height = "30" \'高度等于页面高度 rt2.X = 4 rt2.Y = 2 rt2.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中对齐 rt2.Style.TextAlignVert = prt.AlignVertEnum.Center \'垂直居中对齐 rt2.Style.FontSize = 36 \'字体大小为8磅 rt2.Style.TextColor = Color.Gray \'文本颜色为灰色 ra.Children.Add(rt2) rt2 = New prt.RenderText \'设置文本对象的内容 rt2.Text = "①" \'设置文本内容 rt2.Width = "5" \'宽度等于页面宽度 rt2.Height = "5" \'高度等于页面高度① rt2.X = 40 rt2.Y = 26 rt2.Style.TextColor = Color.red ra.Children.Add(rt2) rt2= New prt.RenderText \'设置文本对象的内容 rt2.Text = "第二张" \'设置文本内容 rt2.Width = "40" \'宽度等于页面宽度 rt2.Height = "30" \'高度等于页面高度 rt2.X = 54 rt2.Y = 2 rt2.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中对齐 rt2.Style.TextAlignVert = prt.AlignVertEnum.Center \'垂直居中对齐 rt2.Style.FontSize = 36 \'字体大小为8磅 rt2.Style.TextColor = Color.Gray \'文本颜色为灰色 ra.Children.Add(rt2) rt2 = New prt.RenderText \'设置文本对象的内容 rt2.Text = "②" \'设置文本内容 rt2.Width = "5" \'宽度等于页面宽度 rt2.Height = "5" \'高度等于页面高度① rt2.X = 90 rt2.Y = 26 rt2.Style.TextColor = Color.red ra.Children.Add(rt2) Doc.WaterMark = ra \'作为水印使用 Doc.Preview() \'预览报表 |