diff --git a/src/views/ReportsDisplayView.vue b/src/views/ReportsDisplayView.vue
index 6b523ace..322a5462 100644
--- a/src/views/ReportsDisplayView.vue
+++ b/src/views/ReportsDisplayView.vue
@@ -32,6 +32,7 @@
variant="solo-filled"
density="compact"
/>
+
@@ -49,6 +50,7 @@ import {
import { computed, ref, watch } from 'vue'
import { configManager } from '@/services/application-config'
import { filterToParams } from '@deltares/fews-wms-requests'
+import { downloadFileWithXhr } from '@/lib/download'
interface Props {
topologyNode?: TopologyNode
@@ -110,6 +112,14 @@ function reportItemToTitle(item: ReportItem) {
function reportToTitle(item: Report) {
return item.moduleInstanceName ?? item.moduleInstanceId
}
+
+async function downloadFile() {
+ const report = selectedReportItem.value
+ if (!report || !url.value) return
+
+ const fileName = `${report.timeZero}-${report.moduleInstanceId}`
+ downloadFileWithXhr(url.value, fileName)
+}