globe with meridians Language: Deutsch · English

open book ReportProvider

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

What is the ReportProvider?

The ReportProvider is an API helper class with all methods for the programmatic execution of a report – e.g. from a server-side rule.

run(...)

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;

Example

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");
    }
}

Related pages

open book Reports


Reports.

Open →

gear Server-side rules


Rules.

Open →

  • Keine Stichwörter