Register application objects as a data source in .NET 8.0 and make their fields available to the report template.

Registering objects. In the report action, pass your collection to RegData under a name that matches the template:
public IActionResult GetReportITypedList()
{
    var report = new StiReport();
    report.Load(StiNetCoreHelper.MapPath(this, "Reports/BusinessObjects_ITypedList.mrt"));
    report.RegData("EmployeeITypedList", CreateBusinessObjectsITypedList.GetEmployees());
    return StiNetCoreViewer.GetReportResult(this, report);
}

public IActionResult GetReportIEnumerable()
{
    var report = new StiReport();
    report.Load(StiNetCoreHelper.MapPath(this, "Reports/BusinessObjects_IEnumerable.mrt"));
    report.RegData("EmployeeIEnumerable", CreateBusinessObjectsIEnumerable.GetEmployees());
    return StiNetCoreViewer.GetReportResult(this, report);
}
Binding to business objects lets a report consume the very same domain classes your application already uses, whether they expose data through IEnumerable or the richer ITypedList interface, without converting them to datasets first.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.