Foxtable(狐表)用户栏目专家坐堂 → 求助 专业报表


  共有2095人关注过本帖平板打印复制链接

主题:求助 专业报表

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


加好友 发短信
等级:三尾狐 帖子:668 积分:5184 威望:0 精华:0 注册:2013/10/7 22:27:00
求助 专业报表  发帖心情 Post By:2019/5/15 22:09:00 [只看该作者]

老师:

您好!

下面的代码,如果是那一行空的,就显示是"部位"

加什么代码可以显示空的.

我用IFF,想不出办法,

rt.Cells(0,1).Text = IIF(CurRow(0).IsNull("部位"),"",CurRow(0)("部位"))

请老师指教!!!

谢谢谢

Dim doc As New PrintDoc '定义一个报表

Dim rt As New prt.RenderTable() '定义一个表格对象

Doc.PageSetting.LeftMargin = 15 '设置左边距

Doc.PageSetting.RightMargin = 10 '设置右边距

Doc.PageSetting.TopMargin = 16 '设置上边距

Doc.PageSetting.BottomMargin = 10 '设置下边距

rt.Width = "Parent.Width" '对象宽度等于页面宽度

rt.Height = "Parent.Height" '对象高度等于页面高度

Dim rx As New prt.RenderText '定义一个文本对象

Dim CurRow As Table = Tables("表A")

rt.Cells(0,0).Text = "  部  位"

rt.Cells(0,1).Text = CurRow(0)("部位")

rt.Cells(0,2).Text = CurRow(1)("部位")

rt.Cells(0,3).Text = CurRow(2)("部位")

rt.Cells(0,4).Text = CurRow(3)("部位")

rt.Cells(0,5).Text = CurRow(4)("部位")

doc.Body.Children.Add(rt) '将表格对象加入到报表中

Doc.Preview() '预览报表


[此贴子已经被作者于2019/5/15 22:48:02编辑过]

 回到顶部