123
This commit is contained in:
49
Dokumentation/Drucken/frmPrintActiveReports.vb
Normal file
49
Dokumentation/Drucken/frmPrintActiveReports.vb
Normal file
@@ -0,0 +1,49 @@
|
||||
Public Class frmPrintActiveReports
|
||||
|
||||
Property DruckArt As String = ""
|
||||
Property DHCPAndrucken As Boolean = False
|
||||
Public dt As DataTable
|
||||
|
||||
Private Sub tsbPDF_Click(sender As Object, e As EventArgs)
|
||||
'Dim Dateiname As String
|
||||
Dim savefiledialog As New SaveFileDialog
|
||||
savefiledialog.Filter = "PDF files (*.pdf)|*.PDF"
|
||||
savefiledialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
|
||||
savefiledialog.ShowDialog()
|
||||
|
||||
Dim p As New GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport
|
||||
If savefiledialog.FileName <> "" Then p.Export(Viewer1.Document, savefiledialog.FileName)
|
||||
|
||||
If System.IO.File.Exists(savefiledialog.FileName) = True Then Process.Start(savefiledialog.FileName)
|
||||
End Sub
|
||||
|
||||
Private Sub frmPrintActiveReports_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Dim tsbPDF As New ToolStripButton("PDF")
|
||||
tsbPDF.Image = My.Resources.pdf512
|
||||
Viewer1.Toolbar.MainBar.Items.Insert(5, tsbPDF)
|
||||
|
||||
Print()
|
||||
End Sub
|
||||
|
||||
Private Sub Print()
|
||||
|
||||
Select Case DruckArt
|
||||
Case "HostListe"
|
||||
Dim Report As New rptHostListe
|
||||
Report.dt = Me.dt
|
||||
Report.DHCPAndrucken = Me.DHCPAndrucken
|
||||
Viewer1.LoadDocument(Report)
|
||||
Case "HostCheckListe"
|
||||
Dim Report As New rptHostCheckListe
|
||||
Report.dt = Me.dt
|
||||
Report.DHCPAndrucken = Me.DHCPAndrucken
|
||||
Viewer1.LoadDocument(Report)
|
||||
Case "HostListeMitZugangsdaten"
|
||||
Dim Report As New rptHostListeMitZugangsdaten
|
||||
Report.dt = Me.dt
|
||||
Report.DHCPAndrucken = Me.DHCPAndrucken
|
||||
Viewer1.LoadDocument(Report)
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user