This commit is contained in:
2023-11-10 11:18:57 +01:00
parent 80a6662f58
commit 114f8c9d9f
3 changed files with 76 additions and 73 deletions

View File

@@ -90,14 +90,17 @@
<OutputPath>bin\x64\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ReportViewer.Runtime.Common.12.0.2402.15\lib\Microsoft.ReportViewer.Common.dll</HintPath>
<Reference Include="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\DEVELOPER1\Desktop\Parkzeit_DLLS\Microsoft.ReportViewer.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ReportViewer.DataVisualization, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ReportViewer.Runtime.Common.12.0.2402.15\lib\Microsoft.ReportViewer.DataVisualization.dll</HintPath>
<Reference Include="Microsoft.ReportViewer.DataVisualization, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\DEVELOPER1\Desktop\Parkzeit_DLLS\Microsoft.ReportViewer.DataVisualization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ReportViewer.ProcessingObjectModel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ReportViewer.Runtime.Common.12.0.2402.15\lib\Microsoft.ReportViewer.ProcessingObjectModel.dll</HintPath>
<Reference Include="Microsoft.ReportViewer.ProcessingObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\DEVELOPER1\Desktop\Parkzeit_DLLS\Microsoft.ReportViewer.ProcessingObjectModel.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ReportViewer.WinForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>

View File

@@ -152,9 +152,9 @@ Public Class frmAuswahl_Abrechnung
Dim Parkzeiten = New cParkzeitenDAL
Select Case cboTarif._value
Case "WABERERS"
Auswertung.BefüllenAbrechnung("Auswertung Parkzeiten Waberer's LKWs", Parkzeiten.LeseParkzeitenFürDruck(hSQL, VarToDbl(txtKosten.Text)), hauswahl, hGesamtdauer, hGesamtkosten)
Auswertung.BefüllenAbrechnung("Auswertung Parkzeiten Waberer's LKWs", Parkzeiten.LeseParkzeitenFürDruck(hSQL, VarToDbl(txtKosten.Text)), cboTarif._value, hauswahl, hGesamtdauer, hGesamtkosten)
Case "VERAG"
Auswertung.BefüllenAbrechnung("Auswertung Parkzeiten LKWs", Parkzeiten.LeseParkzeitenFürDruck(hSQL, VarToDbl(txtKosten.Text)), hauswahl, hGesamtdauer, hGesamtkosten)
Auswertung.BefüllenAbrechnung("Auswertung Parkzeiten LKWs", Parkzeiten.LeseParkzeitenFürDruck(hSQL, VarToDbl(txtKosten.Text)), cboTarif._value, hauswahl, hGesamtdauer, hGesamtkosten)
End Select
Auswertung.Show()

View File

@@ -3,12 +3,12 @@ Imports Microsoft.Reporting.WinForms
Public Class frmDruckansicht
Public Sub BefüllenAbrechnung(ByVal titel As String, ByVal ds As IList(Of cParkzeitDruck), ByVal hAuswahl As String, _
Public Sub BefüllenAbrechnung(ByVal titel As String, ByVal ds As IList(Of cParkzeitDruck), ByVal tarif As String, ByVal hAuswahl As String,
ByVal hGesamtdauer As String, ByVal hGesamtkosten As String)
' Dim rdlcName As String = "Parkzeit.rptAbrechnung.rdlc"
Dim rdlcName As String = "Parkzeit.rptAbrechnung.rdlc"
Select Case hAuswahl
Select Case tarif
Case "WABERERS"
Case Else
rdlcName = "Parkzeit.rptAbrechnungVERAG.rdlc"
@@ -23,85 +23,85 @@ Public Class frmDruckansicht
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Image1", hGesamtkosten))
'End Select
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Titel", titel))
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("SelektionText", hAuswahl))
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("SelektionText", hAuswahl))
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Firmenname", "VERAG Spedition AG"))
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Gesamtdauer", hGesamtdauer))
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Gesamtkosten", hGesamtkosten))
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("KostenJeStunde", "0"))
'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Anwender", SystemInformation.UserName.ToString))
'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("SelektionText", "Selektion: angeforderte, aber nicht erhaltene Bilanzen; Sortierung nach Sachbearbeiter, Kundennr"))
'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("GruppierungNachBetreuer", boolToJaNein(True)))
Me.ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet1", ds))
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.RefreshReport()
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Gesamtdauer", hGesamtdauer))
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Gesamtkosten", hGesamtkosten))
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("KostenJeStunde", "0"))
'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Anwender", SystemInformation.UserName.ToString))
'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("SelektionText", "Selektion: angeforderte, aber nicht erhaltene Bilanzen; Sortierung nach Sachbearbeiter, Kundennr"))
'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("GruppierungNachBetreuer", boolToJaNein(True)))
Me.ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet1", ds))
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.RefreshReport()
End Sub
End Sub
'Private Sub reportVorbereiten(ByVal gruppierungNachBetreuer As Boolean, ByRef reportPath As String)
' Dim doc As XDocument = XDocument.Parse(My.Resources.rptBilanzenAuswertung)
'Private Sub reportVorbereiten(ByVal gruppierungNachBetreuer As Boolean, ByRef reportPath As String)
' Dim doc As XDocument = XDocument.Parse(My.Resources.rptBilanzenAuswertung)
' If Not gruppierungNachBetreuer Then
' Const ns As String = "{http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition}" 'namespace
' 'GroupExpression entfernen
' For Each groupNode As XElement In doc.Descendants(ns & "Group")
' If groupNode.HasAttributes AndAlso groupNode.Attributes("Name").Count = 1 AndAlso groupNode.Attributes("Name")(0).Value = "GroupBetreuer" Then
' groupNode.Elements(ns & "GroupExpressions")(0).Elements(ns & "GroupExpression")(0).Value = ""
' Exit For
' End If
' Next
' If Not gruppierungNachBetreuer Then
' Const ns As String = "{http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition}" 'namespace
' 'GroupExpression entfernen
' For Each groupNode As XElement In doc.Descendants(ns & "Group")
' If groupNode.HasAttributes AndAlso groupNode.Attributes("Name").Count = 1 AndAlso groupNode.Attributes("Name")(0).Value = "GroupBetreuer" Then
' groupNode.Elements(ns & "GroupExpressions")(0).Elements(ns & "GroupExpression")(0).Value = ""
' Exit For
' End If
' Next
' 'Inhalt der Gruppe entfernen
' For Each groupNode As XElement In doc.Descendants(ns & "Rectangle")
' If groupNode.HasAttributes AndAlso groupNode.Attributes("Name").Count = 1 AndAlso groupNode.Attributes("Name")(0).Value = "GroupBetreuerRectangle" Then
' groupNode.Elements(ns & "ReportItems").Remove()
' Exit For
' End If
' Next
' 'Inhalt der Gruppe entfernen
' For Each groupNode As XElement In doc.Descendants(ns & "Rectangle")
' If groupNode.HasAttributes AndAlso groupNode.Attributes("Name").Count = 1 AndAlso groupNode.Attributes("Name")(0).Value = "GroupBetreuerRectangle" Then
' groupNode.Elements(ns & "ReportItems").Remove()
' Exit For
' End If
' Next
' 'Höhe der Gruppe auf 0 setzen
' Dim row As XElement = doc.Descendants(ns & "TablixRow").First
' row.Elements(ns & "Height").First.Value = "0.01625in"
' End If
' 'Höhe der Gruppe auf 0 setzen
' Dim row As XElement = doc.Descendants(ns & "TablixRow").First
' row.Elements(ns & "Height").First.Value = "0.01625in"
' End If
' reportPath = Path.GetTempPath() & "BilanzenAuswertung.rdlc"
' doc.Save(reportPath)
'End Sub
' reportPath = Path.GetTempPath() & "BilanzenAuswertung.rdlc"
' doc.Save(reportPath)
'End Sub
'Public Sub BefüllenSerienbrief(ByVal ds As IList(Of cSerienbriefdruck), ByVal hBearbeiter As String, ByVal hOrt As String, ByVal hTyp As Integer)
' 'Optionen laden
' Dim myOptionen As New cOptionenDAL
' myOptionen.OpenConnection(frmMain.connStr)
' Dim optionen As cOptionen = myOptionen.LesenOptionen()
' myOptionen.CloseConnection()
'Public Sub BefüllenSerienbrief(ByVal ds As IList(Of cSerienbriefdruck), ByVal hBearbeiter As String, ByVal hOrt As String, ByVal hTyp As Integer)
' 'Optionen laden
' Dim myOptionen As New cOptionenDAL
' myOptionen.OpenConnection(frmMain.connStr)
' Dim optionen As cOptionen = myOptionen.LesenOptionen()
' myOptionen.CloseConnection()
' Dim rdlcName As String = "Bilanzen.SerienbriefAuswertung.rdlc"
' Me.ReportViewer1.LocalReport.ReportEmbeddedResource = rdlcName
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Text_Schriftart", "Arial"))
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Text_Größe", optionen.Text_Größe & "pt"))
' Dim fontWeight As String = "Default"
' If (optionen.Auflistung_Fett) Then
' fontWeight = "Bold"
' End If
' Dim rdlcName As String = "Bilanzen.SerienbriefAuswertung.rdlc"
' Me.ReportViewer1.LocalReport.ReportEmbeddedResource = rdlcName
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Text_Schriftart", "Arial"))
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Text_Größe", optionen.Text_Größe & "pt"))
' Dim fontWeight As String = "Default"
' If (optionen.Auflistung_Fett) Then
' fontWeight = "Bold"
' End If
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Auflistung_fett", fontWeight))
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("BriefpartnerUndDurchwahl", hBearbeiter))
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("GeschäftsstelleUndDatum", hOrt))
' 'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Kopf_Bilanz", "Kopf"))
' 'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Fuss_Bilanz", "Fuß"))
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Kopf_Bilanz", "")) 'convertToHTML(hKopf)))
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Fuss_Bilanz", "")) 'convertToHTML(hFuß)))
' Me.ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("SerienbriefDataSet", ds))
' Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
' Me.ReportViewer1.RefreshReport()
' Me.ReportViewer1.Focus()
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Auflistung_fett", fontWeight))
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("BriefpartnerUndDurchwahl", hBearbeiter))
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("GeschäftsstelleUndDatum", hOrt))
' 'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Kopf_Bilanz", "Kopf"))
' 'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Fuss_Bilanz", "Fuß"))
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Kopf_Bilanz", "")) 'convertToHTML(hKopf)))
' Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter("Fuss_Bilanz", "")) 'convertToHTML(hFuß)))
' Me.ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("SerienbriefDataSet", ds))
' Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
' Me.ReportViewer1.RefreshReport()
' Me.ReportViewer1.Focus()
'End Sub
'End Sub
Private Function boolToJaNein(ByVal wert As Boolean) As String
Private Function boolToJaNein(ByVal wert As Boolean) As String
If wert Then
Return "ja"
Else