Foxtable(狐表)用户栏目专家坐堂 → [求助]看看这段代码哪里有问题


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

主题:[求助]看看这段代码哪里有问题

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


加好友 发短信
等级:三尾狐 帖子:710 积分:5345 威望:0 精华:0 注册:2013/5/27 9:48:00
[求助]看看这段代码哪里有问题  发帖心情 Post By:2016/9/12 19:57:00 [只看该作者]

这是一段专业报表 的代码,提示有错误:没有为"Public Function Format(expression As Object,[Style As String = ""])As String"的参数"expression"指定参数      不能保存
涉及日期的几段都不行

Dim doc As New PrintDoc '定义一个报表
Dim rx As New prt.RenderText '定义一个文本对象
Dim CurRow As Row = Tables("责令改正").Current
rx.Style.LineSpacing = 200 '设置双倍行距
doc.Body.Children.Add(rx) '将文本对象加入到报表

rx = new prt.RenderText
rx.Text = CurRow(format[发出日期],"yyy")
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 147
rx.y = 52
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow("编号")
rx.Style.Font = New Font("楷体", 12, FontStyle.Bold)
rx.x = 169
rx.y = 52
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow("被责令单位")
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 20
rx.y = 61
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow("事由")
rx.Style.TextIndent = 30 '首行缩进9毫米
rx.Style.LineSpacing = 200 '设置双倍行距
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 25
rx.y = 72
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow("违反的法律法规")
rx.Style.LineSpacing = 200 '设置双倍行距
rx.Style.TextIndent = 15 '首行缩进9毫米
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 25
rx.y = 103
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow(<format[限定日期],"yyy">)
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 62
rx.y = 139
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow(<format[限定日期],"MM">)
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 94
rx.y = 139
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow(<format[限定日期],"dd">)
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 111
rx.y = 139
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow("改正内容")
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.Style.LineSpacing = 200 '设置双倍行距
rx.x = 40
rx.y = 162
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow("要求")
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.Style.LineSpacing = 200 '设置双倍行距
rx.x = 40
rx.y = 162
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow(<format[发出日期],"yyy">)
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 110
rx.y = 218
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow(<format[发出日期],"MM">)
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 135
rx.y = 218
doc.body.Children.Add(rx)

rx = new prt.RenderText
rx.Text = CurRow(<format[发出日期],"dd">)
rx.Style.Font = New Font("楷体", 14, FontStyle.Bold)
rx.x = 154
rx.y = 218
doc.body.Children.Add(rx)

Doc.Preview() '预览报表
[此贴子已经被作者于2016/9/12 20:19:49编辑过]

 回到顶部