Steps to save ReportOutputDocument as FileDescriptor

What steps would need to be taken to save a ReportOutputDocument as a fileDescriptor.

The idea for this being that I want to be able to click a button that runs a report and then simultaneously saves that outputDocument as a FileDescriptor attribute of an entity while also displaying the report with an exportDisplay.

Using 6.10.10

Hi,

You can copy implementation of com.haulmont.reports.ReportingBean#saveReport method into your code.
Just since you will be doing that from UI layer, you would need to use FileStorageService instead of FileStorageAPI, and DataManager instead of Persistence/EntityManager.

You can also consider calling one of com.haulmont.reports.app.service.ReportService#createAndSaveReport() methods which return FileDescriptor, already saved into file storage.