Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
Dim h As Row=Tables("表1").Current
Dim doc As New PrintDoc '定义一个报表
Doc.PageSetting.BottomMargin = 10 '设置下边距
Dim rt As New prt.RenderText '文本对象
rt.Text = h("负责人") '文本内容
rt.Style.Font = New Font("仿宋_GB2312", 16) '设置字体
rt.X=h("负责人水平")
rt.y=h("负责人垂直")
doc.Body.Children.Add(rt) '加入到报表
doc.Preview() '预览
这段代码出现下列错误提示:
此主题相关图片如下:qq截图20111023122343.bmp
如果把:
rt.X=h("负责人水平")
rt.y=h("负责人垂直")
改成:
rt.X=1
rt.y=3
可以。为什么?
例子最好是商业版的。
要不这样改一下
Dim h As Row=Tables("表A").Current
Dim x As Integer = h("第二列")
Dim y As Integer = h("第三列")
Dim doc As New PrintDoc '定义一个报表
Doc.PageSetting.BottomMargin = 10 '设置下边距
Dim rt As New prt.RenderText '文本对象
rt.Text = h("第一列") '文本内容
rt.Style.Font = New Font("仿宋_GB2312", 16) '设置字体
rt.x = y
rt.y = x
doc.Body.Children.Add(rt) '加入到报表
doc.Preview() '预览
或
Dim h As Row=Tables("表A").Current
Dim doc As New PrintDoc '定义一个报表
Doc.PageSetting.BottomMargin = 10 '设置下边距
Dim rt As New prt.RenderText '文本对象
rt.Text = h("第一列") '文本内容
rt.Style.Font = New Font("仿宋_GB2312", 16) '设置字体
rt.x = Val(h("第二列"))
rt.y = Val(h("第三列"))
doc.Body.Children.Add(rt) '加入到报表
doc.Preview() '预览
多谢,可以了。
不懂,为什么还要转换一下那?