This commit is contained in:
2022-07-08 08:12:43 +02:00
parent 697b78e3c9
commit 7f5057dc3e
121 changed files with 8039 additions and 19322 deletions

View File

@@ -41,7 +41,10 @@ Public Class cProgramFunctions
Public Shared Function printRpt(rpt As GrapeCity.ActiveReports.SectionReport, printername As String, Optional runReport As Boolean = True) As Boolean
Try
rpt.Document.Printer.PrinterName = ""
' System.Diagnostics.Debug.WriteLine("Hier 3: " & Now.ToString("HH:mm:ss.ffff"))
If runReport Then rpt.Run(False)
' System.Diagnostics.Debug.WriteLine("Hier 4: " & Now.ToString("HH:mm:ss.ffff"))
rpt.Document.Printer.PrinterSettings.Copies = 1
If printername <> "" Then
rpt.Document.Printer.PrinterName = printername
@@ -49,14 +52,23 @@ Public Class cProgramFunctions
Dim p As New PrintDialog
If p.ShowDialog() = DialogResult.OK Then
printername = p.PrinterSettings.PrinterName
rpt.Document.Printer.PrinterName = printername
Else
rpt.Dispose()
End If
End If
If Not rpt.Document.Print(False, False) Then
'Test
rpt.Document.Printer.PaperSize = rpt.Document.Printer.PrinterSettings.DefaultPageSettings.PaperSize
Dim dt1 = Now
System.Diagnostics.Debug.WriteLine("Report START: " & dt1.ToString("HH:mm:ss.ffff"))
If Not rpt.Document.Print(False, False, True) Then
MsgBox("Problem beim Drucken.")
End If
Dim dt2 = Now
System.Diagnostics.Debug.WriteLine("Report END: " & dt2.ToString("HH:mm:ss.ffff") & " (DIFFERENZ: " & DateDiff(DateInterval.Second, dt1, dt2) & " Sekunden)")
rpt.Dispose()
Return True