Hi,
I create in my list view a button to print directly the only one report (because I have many template version), but until now I can only download the report
My method:
@Subscribe("printBtn75x35")
public void onPrintBtn75x35(ClickEvent<JmixButton> event) {
ReportOutputDocument label = reportRunner.byReportCode("Labels")
.addParam("entity", depositsDataGrid.getSelectedItems().iterator().next())
.withTemplateCode("750_350_V1")
.withOutputType(ReportOutputType.PDF)
// .withOutputNamePattern("Label")
.run();
//ByteArrayInputStream documentBytes = new ByteArrayInputStream(label.getContent());
downloader.download(label.getContent(), "Label");
}
My question is how I can only open the report?
Thank you!