106 lines
4.5 KiB
VB.net
106 lines
4.5 KiB
VB.net
Imports GrapeCity.ActiveReports
|
|
Imports GrapeCity.ActiveReports.Document
|
|
Imports System.Globalization
|
|
|
|
Public Class rptTGestellungskontrolle
|
|
Public datVon As Date
|
|
Public datBis As Date
|
|
Public statVon As String = "50"
|
|
Public statBis As String = "53"
|
|
Public brg As String = "" 'default brg
|
|
Public nl As String = ""
|
|
Public sqlStr As String = ""
|
|
Public erstelltVon As String = ""
|
|
Private Sub PageFooter1_Format(sender As System.Object, e As System.EventArgs) Handles PageFooter.Format
|
|
lblDetails.Text = String.Format("erstellt am {0} um {1} von {2}", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), erstelltVon)
|
|
|
|
End Sub
|
|
|
|
Private Sub rptAuswertung_NoData(sender As Object, e As System.EventArgs) Handles Me.NoData
|
|
MsgBox("Es wurden keine Daten zum Drucken gefunden.", vbInformation, "Druck Aviso-Auswertung")
|
|
Me.Cancel() 'ev. abbrechen, falls noch aufgebaut wird
|
|
End Sub
|
|
|
|
'''''''' ADD AT RUNTIME:
|
|
'Dim d As New GrapeCity.ActiveReports.SectionReportModel.TextBox
|
|
Private Sub rptAuswertung_ReportStart(sender As System.Object, e As System.EventArgs) Handles MyBase.ReportStart
|
|
|
|
'''''''' ADD AT RUNTIME:
|
|
'd.Location = New Point(2, 0)
|
|
'd.Text = "asd"
|
|
'Me.Detail.Controls.Add(d)
|
|
|
|
|
|
Me.Name = "Auswertung offene Anträge mit Vorauszahlung"
|
|
|
|
'lblHeader.Text = Me.Name
|
|
|
|
'Format + Ränder setzen
|
|
Me.PageSettings.Orientation = Section.PageOrientation.Portrait
|
|
Me.PageSettings.Margins.Left = 0.3
|
|
Me.PageSettings.Margins.Right = 0.3
|
|
Me.PageSettings.Margins.Top = 0.5
|
|
Me.PageSettings.Margins.Bottom = 0.4
|
|
|
|
' Dim sqlStrOLD As String = " SELECT count(*) as [Anzahl Verz], max(veopos_stat) as Status, max(veoant_beznr) as Bezugsnummer,max(veoant_lfdnr) as LfdNr,max(veoant_anzpos)as Pos,max(veoant_arbnr)as ArbNr,max(veoant_mrn) as MRN,max(veoant_andat) as Antragsdatum,max(veoant_sb) as Sachbearbeiter,max(veoant_wgdat) as Gestellungsdatum,sum(veoerz_sicbtg) as [Sichertheits-Betrag], max(veoerz_sicbsc) as Buergschaft " &
|
|
'" FROM tblZabis_Atlas_NCTS " &
|
|
'" WHERE ( veoant_andat BETWEEN '" & datVon.ToShortDateString & "' AND '" & datBis.ToShortDateString & "') " &
|
|
'" AND veoant_stat IN (50,53,60) " &
|
|
'" AND veoerz_sicbsc = '" & brg & "' " &
|
|
'" AND basman_nl='SUW' " &
|
|
'" AND veoant_beznr LIKE 'DU%' " &
|
|
'" GROUP BY veoant_beznr " &
|
|
'" ORDER BY Antragsdatum "
|
|
|
|
|
|
' MsgBox(sqlStr)
|
|
|
|
Dim kundenSQL As New kundenSQL
|
|
Me.DataSource = kundenSQL.loadDgvBySql(sqlStr, "FMZOLL", 600)
|
|
|
|
|
|
Label6.Text = "Zeitraum: von " & datVon.ToShortDateString & " bis " & datBis.ToShortDateString
|
|
Label7.Text = "Bürgschaft: " & brg
|
|
End Sub
|
|
|
|
|
|
Dim dummycount As Integer = 0
|
|
Dim anzLkw As Integer = 0
|
|
Dim anzT As Integer = 0
|
|
Dim summeSiBetr As Double = 0
|
|
Private Sub Detail1_Format(sender As System.Object, e As System.EventArgs) Handles Detail.Format
|
|
dummycount = dummycount + 1
|
|
anzLkw += 1
|
|
lblAnDatValue.Text = CStr(Fields.Item("Antragsdatum").Value)
|
|
' lblAnzTValue.Text = CStr(Fields.Item("Anzahl Verz").Value)
|
|
Label10.Text = CStr(Fields.Item("Niederlassung").Value)
|
|
' lblEmpfaenger.Text = CStr(Fields.Item("ArbNr").Value)
|
|
lblEmpfaenger.Text = CStr(Fields.Item("Empf").Value)
|
|
lblBezugsnrValue.Text = CStr(Fields.Item("Bezugsnummer").Value)
|
|
lblGestDatValue.Text = CStr(Fields.Item("Gestellungsdatum").Value)
|
|
lblMRNValue.Text = CStr(Fields.Item("MRN").Value)
|
|
lblSBValue.Text = CStr(Fields.Item("Sachbearbeiter").Value)
|
|
lblBuergschaft.Text = CStr(Fields.Item("Buergschaft").Value)
|
|
lblSiBetragValue.Text = "€ " & CDbl(Fields.Item("Sichertheits-Betrag").Value).ToString("N2", CultureInfo.InvariantCulture)
|
|
lblStatValue.Text = CStr(Fields.Item("Status").Value)
|
|
|
|
' anzT += CInt(lblAnzTValue.Text)
|
|
summeSiBetr += CDbl(Fields.Item("Sichertheits-Betrag").Value)
|
|
|
|
'Abwechselnd grauen und weißen Hintergrund
|
|
If (dummycount Mod 2) = 0 Then
|
|
Detail.BackColor = Drawing.Color.White
|
|
Else
|
|
Detail.BackColor = Drawing.Color.WhiteSmoke
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub ReportFooter1_Format(sender As Object, e As EventArgs) Handles ReportFooter1.Format
|
|
lblSummeSiBetr.Text = "€ " & summeSiBetr.ToString("N2", CultureInfo.InvariantCulture)
|
|
lblAnzAbf.Text = anzLkw
|
|
lblAnzT.Text = anzT
|
|
|
|
End Sub
|
|
End Class
|