Imports Microsoft.VisualBasic
Imports System
Imports DevExpress.Xpf.Printing
Imports DevExpress.XtraReports.UI
Imports Microsoft.Win32

Public Class tsXtraReportPreviewModel
    Inherits XtraReportPreviewModel

    Public Sub New(ByVal report As DevExpress.XtraReports.UI.XtraReport)
        MyBase.New(report)
    End Sub
    Protected Overrides Sub Save(parameter As Object)
        'MyBase.Save(parameter)

        Dim sfd As New SaveFileDialog
        sfd.FileName = PrintingSystem.ExportOptions.PrintPreview.DefaultFileName
        sfd.Filter = "Archivo pdf|*.pdf"
        sfd.DefaultExt = ".pdf"
        If sfd.ShowDialog Then
            PrintingSystem.ExportToPdf(sfd.FileName)
        End If

    End Sub
End Class
