我想实现下面的结果在datagrid中显示,请写出代码,谢谢!
Date Series AssyPN Failure Description
201012-20 NEO 750-031088 hsl2fail
201012-20 NEO 750-031088 hsl2fail
201012-20 NEO 750-031088 hsl2fail
201012-20 AgentSimth 750-031088 hsl2fail
201012-21 AgentSimth 750-031088 hsl2fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-23 NEO 750-031088 diag luchip fail
201012-23 NEO 750-031088 diag luchip fail
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stressTopIssue Failure Description Count
Top 1 diag luchip fail 10
Top 2 ram_bist all stress 8
Top 3 hsl2fail 6
Date Series AssyPN Failure Description
201012-20 NEO 750-031088 hsl2fail
201012-20 NEO 750-031088 hsl2fail
201012-20 NEO 750-031088 hsl2fail
201012-20 AgentSimth 750-031088 hsl2fail
201012-21 AgentSimth 750-031088 hsl2fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-23 NEO 750-031088 diag luchip fail
201012-23 NEO 750-031088 diag luchip fail
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stressTopIssue Failure Description Count
Top 1 diag luchip fail 10
Top 2 ram_bist all stress 8
Top 3 hsl2fail 6
解决方案 »
- OptionButton如何实现像Label中的Autosize和wordwrap功能
- 问一下为什么编译可以运行生成后出错
- vb如何操作ini文件
- vb中如何调用SetConsoleWindowInfo函数
- 请教fpspread做表格编辑的问题
- ★有个函数我忘了?就是可以得到某个字符串中某个字符的个数???
- 软件开发完成,为了与大家共同提高,把软件拿出来与大家分享,希望大家找出不足!
- 如何使treeview控件在清空的时候,速度加快一点!?``
- 小弟论坛开张了,请大家有空去坐坐阵!(注:是动网论坛,小弟无能力自己编)
- 有谁知道开始菜单的运行是用的什么API函数
- 数据统计问题?
- VB+access 怎样实现这样的结果?急!急!
select [Failure Description],count(*) as [Count]
from table1
group by 2 desc
)
'菜单"工程"->"引用" 找 Microsoft ActiveX Data Object.... Dim cn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim SqlStr As String
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Mode=ReadWrite;Persist Security Info=False;Jet OLEDB:Database Password=111"
SqlStr = "Select Date,Series,AssyPN,Failure,Description From 某个表"
rst.CursorLocation = adUseClient
rst.Open SqlStr, cn, adOpenDynamic, adLockOptimistic, adCmdText '打开记录集
Set DataGrid1.DataSource = rst '给DataGrid修改数据源