阿泰,请有空帮我解决这个问题:
我要在报表中求出组名所在的页数(vb.net 2005)
举个例子:
编号 名称 首字拼音
001 abc a
002 acd a
004 dcd d
005 ggg g
006 gff g
以首字拼音分组后
a
001 abc
002 acd
d
004 dcd
g
005 ggg
006 gff
现在想知道组名a,d,g所在页数,怎么在vb.net知道?
小弟初学,请帮帮忙啊
...全文
14010打赏收藏
在报表中求出组名所在的打印页数(vb.net 2005)
阿泰,请有空帮我解决这个问题: 我要在报表中求出组名所在的页数(vb.net 2005) 举个例子: 编号 名称 首字拼音 001 abc a 002 acd a 004 dcd d 005 ggg g 006 gff g 以首字拼音分组后 a 001 abc 002 acd d 004 dcd g 005 ggg 006 gff 现在想知道组名a,d,g所在页数,怎么在vb.net知道? 小弟初学,请帮帮忙啊
Private Sub CHK()
Dim CL As New ClsSQLDbOperation _
("D:\Backup\我的文档\Visual Studio 2005\" & _
"Projects\好易手机下载系统\好易手机下载系统\bin\Debug\data", "FlongDB")
For Each row As DataRow In CL.Fnc_GetSQL("select * from artist where stylename ='华人男歌手' order by artistname").Rows
CrystalReportViewer1.ShowFirstPage()
Dim NumberPage As String = ""
Dim nw As Date = Now
Dim pstr As String = row.Item("artistname")
If pstr <> "[信]" Then
'CrystalReportViewer1.Visible = False
up:
Dim NB As Boolean = CrystalReportViewer1.SearchForText("【" & pstr & "】")
If NB Then
NumberPage &= CrystalReportViewer1.GetCurrentPageNumber() & ","
CrystalReportViewer1.ShowNextPage()
GoTo up
Else
Console.WriteLine("【" & row.Item("artistname") & "】" & "[" & NumberPage & "]")
CrystalReportViewer1.ShowPreviousPage()
End If
End If
Private Sub CHK()
Dim CL As New ClsSQLDbOperation _
("D:\Backup\我的文档\Visual Studio 2005\" & _
"Projects\好易手机下载系统\好易手机下载系统\bin\Debug\data", "FlongDB")
For Each row As DataRow In CL.Fnc_GetSQL("select * from artist where stylename ='华人男歌手' order by artistname").Rows
CrystalReportViewer1.ShowFirstPage()
Dim NumberPage As String = ""
Dim nw As Date = Now
Dim pstr As String = row.Item("artistname")
If pstr <> "[信]" Then
'CrystalReportViewer1.Visible = False
up:
Dim NB As Boolean = CrystalReportViewer1.SearchForText("【" & pstr & "】")
If NB Then
NumberPage &= CrystalReportViewer1.GetCurrentPageNumber() & ","
CrystalReportViewer1.ShowNextPage()
GoTo up
Else
Console.WriteLine("【" & row.Item("artistname") & "】" & "[" & NumberPage & "]")
CrystalReportViewer1.ShowPreviousPage()
End If
End If