这是一段专业报表 的代码,提示有错误:没有为"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编辑过]