Language: Deutsch · English
Run reports via the API – ReportProvider.run(...) returns a NuclosFile to attach or send.
REFERENZ DEVELOPER UPDATED: JUL 2026 APPLIES TO NUCLOS 4.2026.X
On this page
The ReportProvider is an API helper class with all methods for the programmatic execution of a report – e.g. from a server-side rule.
Runs a report. You specify the output format, which is uniquely assigned to a report – so the format is sufficient. The return value is a NuclosFile that can, for example, be attached to a BO or sent by e-mail.
public static NuclosFile run(OutputFormat format) throws BusinessException;
With parameters for the query:
public static NuclosFile run(OutputFormat format, Map<String, Object> params) throws BusinessException;
When an order is created, the report is executed automatically and the PDF is attached to the BO:
package org.nuclet.businessentity;
import org.nuclet.report.MeinAuftragReportRE;
import org.nuclos.api.common.NuclosFile;
import org.nuclos.api.provider.ReportProvider;
public class AuftragReportRegel implements InsertRule {
public void insert(InsertContext context) throws BusinessException {
Auftrag a = context.getBusinessObject(Auftrag.class);
NuclosFile result = ReportProvider.run(MeinAuftragReportRE.Deutsch_PDF);
a.insertAttachment(result, "Kommentar: Generierter Auftragsreport");
}
}