条件: quhuojilu 表中 剩余数量> 0 非常感谢~~~
Dim doc As New PrintDoc '定义一个报表
'Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
Dim ra As New prt.RenderArea
Dim rt As prt.RenderText
Dim drs As List(of DataRow) = DataTables("QuHuoJiLu").Select("剩余数量 > 0")
doc.PageSetting.Width = 58 '纸张宽度为100毫米
Doc.PageSetting.LeftMargin = 2 '设置左边距
'Doc.PageSetting.RightMargin = 10 '设置右边距
Doc.PageSetting.TopMargin = 5 '设置上边距
'Doc.PageSetting.BottomMargin = 20 '设置下边距
'rt.Text= "[Fields!录入时间.Value]"
ra.Width = 40 '设置标签宽度
ra.SplitHorzBehavior = prt.SplitBehaviorEnum.Never '禁止水平分割
ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never '禁止垂直分割
ra.Style.Spacing.Right = 2 '设置标签之间的所有和上下间隔为2毫米
ra.Style.Spacing.Bottom = 2
ra.Style.Padding.All = 1 ' 标签内容距离边框为1毫米
ra.Style.Borders.All = New prt.Linedef(0.3, Color.blue) '设置边框
ra.DataBinding.DataSource = BindTables("QuHuoJiLu") '将容器绑定到员工表
Doc.Body.ChildRen.Add(ra) '将容器加入到报表中
rt = New prt.RenderText
rt.Text = "姓名:[Fields!客户名称.Value]"
ra.Children.Add(rt) '添加到容器中
rt = New prt.RenderText
rt.Text = "部门:[Fields!商城代码.Value]"
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text = "订货日期:[Fields!录入时间.Value]"
ra.Children.Add(rt) '添加到容器中
rt = New prt.RenderText
rt.Text = "Ok 未送 退款"
ra.Children.Add(rt) '添加到容器中
Doc.Preview() '预览报表