SQL Server Anpassungen, Reports repariert

This commit is contained in:
ms
2020-06-24 09:24:33 +02:00
parent a4c8b45922
commit c142858a98
11 changed files with 91 additions and 57 deletions

View File

@@ -250,6 +250,7 @@ Public Class frmAuswertung
Dim vpasql As New VERAG_PROG_ALLGEMEIN.SQL
dt = vpasql.loadDgvBySql(sql, database)
'dt = RemoveDuplicateRows(dt, "atr_frachtpos")
printauswertung.von = von
printauswertung.bis = bis
@@ -270,4 +271,24 @@ Public Class frmAuswertung
Return filialnr
End Function
Public Function RemoveDuplicateRows(ByVal dTable As DataTable, ByVal colName As String) As DataTable
Dim hTable As Hashtable = New Hashtable()
Dim duplicateList As ArrayList = New ArrayList()
For Each drow As DataRow In dTable.Rows
If hTable.Contains(drow(colName)) Then
duplicateList.Add(drow)
Else
hTable.Add(drow(colName), String.Empty)
End If
Next
For Each dRow As DataRow In duplicateList
dTable.Rows.Remove(dRow)
Next
Return dTable
End Function
End Class