Show Message when exporting report by hand
This commit is contained in:
@@ -282,9 +282,21 @@ Public Class frmImportMain
|
|||||||
' Generate the report
|
' Generate the report
|
||||||
Dim oReport = ReportGenerator.GenerateReport(oDocument, CurrentTemplate)
|
Dim oReport = ReportGenerator.GenerateReport(oDocument, CurrentTemplate)
|
||||||
Dim oFilePath = ReportGenerator.GetReportFilePath(oDocument, CurrentTemplate)
|
Dim oFilePath = ReportGenerator.GetReportFilePath(oDocument, CurrentTemplate)
|
||||||
|
Dim oFileInfo = New FileInfo(oFilePath)
|
||||||
|
|
||||||
' Export it to pdf
|
' Export it to pdf
|
||||||
oReport.ExportToPdf(oFilePath)
|
oReport.ExportToPdf(oFilePath)
|
||||||
|
|
||||||
|
Dim oMessage = $"Die Datei wurde im Verzeichnis '{oFileInfo.Directory}' abgelegt. Möchten Sie die Datei jetzt öffnen?"
|
||||||
|
Dim oResult = MsgBox(oMessage, MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text)
|
||||||
|
|
||||||
|
If oResult = MsgBoxResult.Yes Then
|
||||||
|
Try
|
||||||
|
Process.Start(oFilePath)
|
||||||
|
Catch ex As Exception
|
||||||
|
FormHelper.ShowError(ex, "Export Report")
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Async Sub btnTestTransferFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTestTransferFile.ItemClick
|
Private Async Sub btnTestTransferFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTestTransferFile.ItemClick
|
||||||
@@ -739,6 +751,9 @@ Public Class frmImportMain
|
|||||||
WebService.RaiseWebServiceProgress("Bericht erzeugen")
|
WebService.RaiseWebServiceProgress("Bericht erzeugen")
|
||||||
|
|
||||||
' Generate the report
|
' Generate the report
|
||||||
|
|
||||||
|
' TODO: Call GetReportFilePath in GenerateReport to better control
|
||||||
|
' when filename is generated and use it as placeholder
|
||||||
Dim oReport = ReportGenerator.GenerateReport(pDocument, CurrentTemplate)
|
Dim oReport = ReportGenerator.GenerateReport(pDocument, CurrentTemplate)
|
||||||
Dim oFilePath = ReportGenerator.GetReportFilePath(pDocument, CurrentTemplate)
|
Dim oFilePath = ReportGenerator.GetReportFilePath(pDocument, CurrentTemplate)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user