以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  关于报表  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=52394)

--  作者:1234567
--  发布时间:2014/6/15 9:50:00
--  关于报表


图片点击可在新窗口打开查看此主题相关图片如下:1554.png
图片点击可在新窗口打开查看

 

 

报表

图片点击可在新窗口打开查看此主题相关图片如下:1555.png
图片点击可在新窗口打开查看


--  作者:有点甜
--  发布时间:2014/6/15 9:54:00
--  

 用 标记+事件 去处理

 

http://www.foxtable.com/help/topics/1396.htm

 

http://www.foxtable.com/help/topics/1954.htm

 


--  作者:1234567
--  发布时间:2014/6/15 10:02:00
--  

我是用分组统计出的报表,请版主帮我改改。

Dim doc As New PrintDoc
doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
Dim rt As New prt.RenderText
Dim Filter As String
With e.Form.Controls("ComboBox3")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "加工内容_工序 = \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("DateTimePicker1")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "[加工_加工日期]>= #" & .Value & "#"       
    End If
End With
With e.Form.Controls("DateTimePicker3")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "[加工_加工日期]<=  #" & .Value & "#"       
    End If
End With
With e.Form.Controls("TextBox1")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "工艺单编号 Like \'%" & .Value & "%\'"  

   End If
End With
With e.Form.Controls("ComboBox4")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "加工状态 = \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("DropBox1")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "加工_加工人 = \'" & .Value & "\'"
    End If
End With
If Filter > "" Then
    Tables("加工统计_Table1").Filter = Filter
End If

 DataTables("加工统计_Table1").LoadFilter = Filter
    DataTables("加工统计_Table1").Load() \'加载数据

Dim rt1 As New prt.RenderText \'定义一个文本对象
rt1.Text = "加工工时统计" 这句怎么改?

rt1.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中
rt1.Style.Font = New Font("宋体", 16, FontStyle.Bold) \'设置字体
rt1.Style.Spacing.Bottom = 10 \'设置下间隔为3毫米

doc.Body.Children.Add(rt1) \'将文本对象加入到报表
Dim rt2 As New prt.RenderText
rt2 = New prt.RenderText

    rt2.Style.FontSize = 10
       rt2.Style.Spacing.Bottom = 2
    rt2.Text = "日期: " & Today
rt2.Style.TextAlignHorz = prt.AlignHorzEnum.Right
rt2.Style.TextAlignVert = prt.AlignVertEnum.Bottom \'垂直居中

doc.Body.Children.Add(rt2) \'将文本对象加入到报表
 

Dim Agg As New prt.DataBinding.Aggregate("GroupSum") \'新定义统计的名称为GroupSum,名称随意即可.

rt.DataBinding.DataSource = BindTables("加工统计_Table1") \'将容器绑定到订单表
rt.DataBinding.Grouping.Expressions.Add("Fields!加工_加工人.Value") \'根据产品进行分组
rt.Text= "[Fields!加工_加工人.Value]: [Aggregates!GroupSum.Value]" \'设置打印内容
rt.Width = 50 \'宽度53毫米
rt.Height = 8 \'高度24毫米
doc.body.Children.Add(rt)

agg.DataBinding = rt.DataBinding \'Agg的DataBinding属性,应该设为打印对象的DataBinding
agg.Running = 1 \'分组统计
agg.Expressi \'统计字段
doc.DataSchema.Aggregates.Add(agg)\'定义好的统计必须添加到报表的DataSchema中

doc.Preview()


--  作者:有点甜
--  发布时间:2014/6/15 10:07:00
--  
Dim d1 As Date = e.Form.Controls("DateTimePicker1").Value
Dim d2 As Date = e.Form.Controls("DateTimePicker3").Value
rt1.Text = Format(d1, "MM月dd日") & "-" & Format(d2, "MM月dd日") & "加工工时统计"

--  作者:1234567
--  发布时间:2014/6/15 10:17:00
--  

图片点击可在新窗口打开查看此主题相关图片如下:1556.png
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:1557.png
图片点击可在新窗口打开查看

--  作者:有点甜
--  发布时间:2014/6/15 10:21:00
--  
 Filter = Filter & "加工_加工人 in (\'" & .Value.Replace(",", "\',\'") & "\')"
--  作者:1234567
--  发布时间:2014/6/15 10:33:00
--  

不能加载复选中的人员,是否我的录入处有问题,名字间没用逗号隔开。


图片点击可在新窗口打开查看此主题相关图片如下:1558.png
图片点击可在新窗口打开查看


--  作者:有点甜
--  发布时间:2014/6/15 10:34:00
--  

 目录树,确定的时候,必须用逗号隔开。