A report's data can be supplied and switched from Blazor code. This example loads a report and lets the user swap between two datasets.

Preparing the data. Read or create the data source, register it in the report dictionary, synchronize the schema, and render with the supplied records.
<StiBlazorViewer Report="@Report" />

@code {
    private StiReport Report;

    private void SetFirstDataSet()
    {
        var report = this.Report.Clone() as StiReport;
        report.Dictionary.Databases.Clear();
        report.RegData("Demo", firstDataSet);
        report.Render();
        this.Report = report;
    }
}
The report is cloned so each dataset produces an independent document; Dictionary.Databases.Clear() drops the design-time connection and RegData registers the new data. Reassigning this.Report updates the viewer.

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