Showing a Report in the Viewer
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.Stimulsoft ships native Blazor components, so the viewer is placed as a Razor tag and fed a
Place the viewer component.
How it works. The component renders the bound report entirely in the browser, updating whenever the
На скриншоте ниже Вы можете увидеть результат выполнения данного кода:

StiReport object.Place the viewer component.
<StiBlazorViewer Report="@Report" />Load a report. Create the report and load its template in OnInitializedAsync:private StiReport Report;
protected override async Task OnInitializedAsync()
{
Report = new StiReport();
var bytes = await Http.GetByteArrayAsync("Reports/TwoSimpleLists.mrt");
Report.Load(bytes);
}StiBlazorViewer— the native Blazor viewer; bind itsReportparameter to your report object.Http.GetByteArrayAsync— fetches the.mrtfrom wwwroot (WebAssembly), thenLoad(bytes)opens it.
How it works. The component renders the bound report entirely in the browser, updating whenever the
Report object changes.На скриншоте ниже Вы можете увидеть результат выполнения данного кода:
