Imports System.IO
Imports Microsoft.Reporting.WinForms
Imports Gemeinsames

Public Class frmPrintView
    Public frmCheckliste As frmCheckliste
    Private reportviewer As ReportViewer = Me.ReportViewer1
    Public speedPrint As Boolean = False



    Private Function boolToJaNein(ByVal wert As Boolean) As String
        If wert Then
            Return "ja"
        Else
            Return "nein"
        End If
    End Function

    Private Sub frmPrintView_CausesValidationChanged(sender As Object, e As EventArgs) Handles Me.FormClosed
        frmCheckliste.BringToFront()
    End Sub

    Private Sub frmDruckansicht_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'Me.ReportViewer1.RefreshReport()

    End Sub

    Private Sub ReportViewer1_Load(sender As Object, e As EventArgs) Handles ReportViewer1.Load

    End Sub

    Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles btnReportPrint.Click
        If Me.ReportViewer1.PrintDialog() = Windows.Forms.DialogResult.OK Then Me.Close()
    End Sub


    Private Sub ReportViewer1_RenderingComplete(sender As Object, e As RenderingCompleteEventArgs) Handles ReportViewer1.RenderingComplete
        If speedPrint Then
            btnReportPrint.PerformClick()
        End If
    End Sub
End Class