Cannot get unfetched attribute [templates] from detached object

Hi, I have a report with a jrxml template, and sql dataset, when I run this from Run Report window it work good,

image

but I am trying to run this from button and I get the next error:

image

Any ideas?

Thank you!

Hi,

Could you provide source code for “Report” button? Do you use com.haulmont.reports.gui.actions.RunReportAction?

Hi Andrey

I solved it using printReport from ReportGuiManager.

Thank you!