以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  制作桌签  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=132209)

--  作者:nxqtxwz
--  发布时间:2019/3/16 17:46:00
--  制作桌签

请问我想制作一个会议的桌签,就是是桌子上放的哪种用A4纸折的三棱柱型的桌签。主要是桌签对折,有一面的字(姓名等)要反着放,怎么做呢?

用WORD报表无法实现,只能用专业报表来做,但代码不知如何写呢。

[此贴子已经被作者于2019/3/16 18:28:04编辑过]

--  作者:nxqtxwz
--  发布时间:2019/3/16 21:14:00
--  

请老师给改一改,不会弄了。一正一反两个姓名中间的间距怎么控制呢?

 

Dim doc As New PrintDoc \'定义一个报表
Dim tbl As Table = Tables("员工")
For i As Integer = tbl.TopRow To tbl.BottomRow
    Dim rw As Row = tbl.Rows(i)
   Dim rt As New prt.RenderTable() \'定义一个表格对象
    Dim rx As New prt.RenderTable()  \'定义一个文本对象
    Dim ra1 As New prt.RenderArea \'定义一个容器
Dim ra2 As New prt.RenderArea \'定义一个容器
    rt.Style.Spacing.Bottom = 5 \'和下一个资料卡的距离是5毫米
      

 rx.Cells(0,1).Text = rw("姓名")
 rx.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中
rx.Style.Font = New Font("宋体",100, FontStyle.Bold) \'设置字体
      ra1.Children.Add(rx) \'加入到容器中
 Doc.Body.ChildRen.Add(ra1)


    rt.Style.TextAngle = -180 \'顺时钟旋转45度
       rt.Cells(0,1).Text = rw("姓名")
 rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中
rt.Style.Font = New Font("宋体",100, FontStyle.Bold) \'设置字体
      ra2.Children.Add(rt) \'加入到容器中
    Doc.Body.ChildRen.Add(ra2) \'将容器加入到报表中
Next
Doc.Preview() \'预览报表

[此贴子已经被作者于2019/3/17 14:43:34编辑过]

--  作者:有点蓝
--  发布时间:2019/3/18 8:53:00
--  
参考:http://www.foxtable.com/webhelp/scr/1177.htm

ra1.y = 50
ra2.y = 200

--  作者:nxqtxwz
--  发布时间:2019/3/18 20:21:00
--  

老师,请问为什么所有人都打在一页的同一位置上。想一个人打在一张纸上面怎么实现呢?

 

 

Dim doc As New PrintDoc \'定义一个报表
Dim tbl As Table = Tables("员工")
doc.PageSetting.PaperKind = 9
Doc.PageSetting.LeftMargin = 10 \'设置左边距
Doc.PageSetting.RightMargin = 10 \'设置右边距
Doc.PageSetting.TopMargin = 20 \'设置上边距
Doc.PageSetting.BottomMargin = 20 \'设置下边距

For i As Integer = tbl.TopRow To tbl.BottomRow
    Dim rw As Row = tbl.Rows(i)
    Dim rt As New prt.RenderTable() \'定义一个表格对象
    Dim rx As New prt.RenderTable()  \'定义一个文本对象
    Dim ra1 As New prt.RenderArea \'定义一个容器
    Dim ra2 As New prt.RenderArea \'定义一个容器
    \' rt.Style.Spacing.Bottom = 5 \'和下一个资料卡的距离是5毫米
   
    ra1.y =80
    rx.Style.TextAngle = -180 \'顺时钟旋转45度
    rx.Cells(0,0).Text = rw("姓名")
    rx.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中
    rx.Style.Font = New Font("宋体",100, FontStyle.Bold) \'设置字体
    ra1.Children.Add(rx) \'加入到容器中
    Doc.Body.ChildRen.Add(ra1)
   
   
    ra2.y = 180
    rt.Cells(0,0).Text = rw("姓名")
    rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中
    rt.Style.Font = New Font("宋体",100, FontStyle.Bold) \'设置字体
    ra2.Children.Add(rt) \'加入到容器中
    Doc.Body.ChildRen.Add(ra2) \'将容器加入到报表中
Next
Doc.Preview() \'预览报表


--  作者:有点蓝
--  发布时间:2019/3/18 20:40:00
--  
换页参考:http://www.foxtable.com/webhelp/scr/1196.htm