以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 标签的个数为产品数量 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=169357) |
-- 作者:花边 -- 发布时间:2021/6/13 10:17:00 -- 标签的个数为产品数量 标签的个数=产品数量 该怎么弄? |
-- 作者:有点蓝 -- 发布时间:2021/6/13 20:12:00 -- 没法弄,建议使用专业报表:http://www.foxtable.com/webhelp/topics/1219.htm |
-- 作者:花边 -- 发布时间:2021/6/15 10:41:00 -- Dim doc As New PrintDoc \'定义一个报表 Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight Dim ra As New prt.RenderArea Dim rt As prt.RenderText ra.Width = 50 \'设置标签宽度 ra.SplitHorzBehavior = prt.SplitBehaviorEnum.Never \'禁止水平分割 ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never \'禁止垂直分割 ra.Style.Spacing.Right = 1 \'设置标签之间的所有和上下间隔为2毫米 ra.Style.Spacing.Bottom = 1 ra.Style.Padding.All = 1 \' 标签内容距离边框为1毫米 ra.Style.Borders.All = New prt.Linedef(0.3, Color.Red) \'设置边框 ra.DataBinding.DataSource = BindTables("生产单") \'将容器绑定到员工表 Doc.Body.ChildRen.Add(ra) \'将容器加入到报表中 rt = New prt.RenderText rt = New prt.RenderText rt.Text = "[Fields!客户.Value]" rt.X = 1 rt.Y = 1 ra.Children.Add(rt) \'添加到容器中 rt = New prt.RenderText rt.Text = "[Fields!订单号.Value]" rt.X = 15 rt.Y = 1 ra.Children.Add(rt) rt = New prt.RenderText rt.Text = "[Fields!标号.Value]" rt.X = 2 rt.Y = "Prev.Bottom + 2" \'垂直坐标位于迁移对象之下的2毫米 ra.Children.Add(rt) rt = New prt.RenderText rt.Text = "[Fields!产品名.Value]" rt.X =20 rt.Y = "Prev.Top" \'垂直坐标位于迁移对象之下的2毫米 ra.Children.Add(rt) rt = New prt.RenderText rt.Text = "[Fields!长.Value]" rt.X = 2 rt.Y = "Prev.Bottom + 2" ra.Children.Add(rt) rt = New prt.RenderText rt.Text = "* [Fields!宽.Value]" rt.X = 12 rt.Y = "Prev.Top" \'垂直坐标位于迁移对象之下的2毫米 ra.Children.Add(rt) rt = New prt.RenderText rt.Text = "= [Fields!数量.Value]" rt.X = 26 rt.Y = "Prev.Top" \'垂直坐标位于迁移对象之下的2毫米 ra.Children.Add(rt) rt = New prt.RenderText rt.Text = "[Fields!加工要求.Value]" rt.X = 2 rt.Y = "Prev.Bottom + 2" ra.Children.Add(rt) Doc.Preview() \'预览报表 不会设置~ 标签的个数=产品数量 怎么编??
|
-- 作者:有点蓝 -- 发布时间:2021/6/15 11:31:00 -- 请上传实例说明 |