有其他软件可以打开吗?通过类型以下代码生成的专业报表保存后有什么方法可以编辑?保存为pDF文件不能编辑,word格式的文件保存不了原格式,有什么好的方法即能编辑又能保留原格式呢?
Dim doc As New PrintDoc '定义一个报表
Doc.Columns.Add()
'增加三栏
Doc.Columns.Add()
Doc.Columns.Add()
Doc.Columns(0).Spacing = 2
'栏间距2毫米
Doc.Columns(1).Spacing = 2
'栏间距2毫米
For i
As
integer = 1
to
100
Dim ra As New prt.RenderArea
Dim rt As prt.RenderText
ra.Width = "Parent.Width"
'宽度等于分栏宽度
ra.Height =
24
'高度24毫米
ra.SplitHorzBehavior = prt.SplitBehaviorEnum.Never
'禁止水平分割
ra.SplitVertBehavior =
prt.SplitBehaviorEnum.Never '禁止垂直分割
ra.Style.Spacing.Bottom
= 2
ra.Style.Borders.All = New prt.Linedef(0.3,
Color.Red) '设置边框
Doc.Body.ChildRen.Add(ra) '将容器加入到报表中
rt = New prt.RenderText
rt.Text =
"姓名:"
rt.X =
2
rt.Y =
2
ra.Children.Add(rt) '添加到容器中
rt = New prt.RenderText
rt.Text = "黄财德"
rt.X = 15
rt.Y = 2
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text = "职务:"
rt.X = 2
rt.Y = "Prev.Bottom + 2"
'垂直坐标位于迁移对象之下的2毫米
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text =
"总经理"
rt.X =
15
rt.Y =
"Prev.Top"
'垂直坐标和前一对象相同
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text =
"编号:"
rt.X =
2
rt.Y =
"Prev.Bottom + 2"
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text =
"44081919710917243"
rt.X = 15
rt.Y =
"Prev.Top"
ra.Children.Add(rt)
Next
Doc.Preview() '预览报表