Table of Contents

Typed IDs for Reports in Server Code

Neos automatically generates strongly-typed string constants for reports and report styles during the build process. These constants are available in server-side C# code through the Application.Abstractions.Ids namespace.

Generated namespaces

Two sub-namespaces are generated under <ClusterRootNamespace>.Application.Abstractions.Ids:

  • Reports — contains one constant per report defined in the cluster.
  • ReportStyles — contains one constant per report style defined in the cluster.

The constants are of type GroupeIsa.Neos.Application.Ids.ReportId and GroupeIsa.Neos.Application.Ids.ReportStyleId respectively.

Using typed IDs in server methods

Unlike frontend code, where the generated typed-ID namespace is included implicitly by the framework, server-side code requires an explicit using directive.

Add the following using at the top of your business assembly file:

using MyApp.Application.Abstractions.Ids;

Once the using is in place, the constants are available directly:

ReportId reportId = Reports.ReportFontsList;
ReportStyleId styleId = ReportStyles.MyCompanyStyle;

They can then be passed to any Neos API that accepts a ReportId or ReportStyleId, such as IReportGenerator:

await _reportGenerator.RequestAsync<MyEntityView>(
    new ReportRequestArguments(Reports.ReportFontsList),
    (view, response) => view.HandleReportResultAsync(response));

Read more

For usage patterns in frontend code — including navigation, conditional logic, migration from legacy hard-coded strings, and best practices — see Typed IDs for UI Elements.