Foxtable(狐表)用户栏目专家坐堂 → 制作桌签


  共有2367人关注过本帖树形打印复制链接

主题:制作桌签

帅哥哟,离线,有人找我吗?
nxqtxwz
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1492 积分:12149 威望:0 精华:0 注册:2013/3/19 16:41:00
制作桌签  发帖心情 Post By:2019/3/16 17:46:00 [只看该作者]

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

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

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

 回到顶部
帅哥哟,离线,有人找我吗?
nxqtxwz
  2楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1492 积分:12149 威望:0 精华:0 注册:2013/3/19 16:41:00
  发帖心情 Post By: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编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:105495 积分:536466 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/3/18 8:53:00 [只看该作者]

参考:http://www.foxtable.com/webhelp/scr/1177.htm

ra1.y = 50
ra2.y = 200

 回到顶部
帅哥哟,离线,有人找我吗?
nxqtxwz
  4楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1492 积分:12149 威望:0 精华:0 注册:2013/3/19 16:41:00
  发帖心情 Post By: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() '预览报表


 回到顶部
帅哥,在线噢!
有点蓝
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:105495 积分:536466 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/3/18 20:40:00 [只看该作者]


 回到顶部