Using the two Viewer in the One Project
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.Two independent dashboard viewers can live on one page, each bound to its own report object.
In Angular.
How it works. The viewer is a self-contained component, so any number can be placed on a page, each with a separate dashboard.
In Angular.
@Component({
imports: [Viewer],
template: `
<sti-viewer [report]="report1"></sti-viewer>
<sti-viewer [report]="report2"></sti-viewer>`
})
export class Example {
report1: Stimulsoft.Report.StiReport;
report2: Stimulsoft.Report.StiReport;
constructor() {
this.report1 = new Stimulsoft.Report.StiReport();
this.report1.loadFile("Dashboards/Dashboard.mrt");
this.report2 = new Stimulsoft.Report.StiReport();
this.report2.loadFile("Dashboards/Orders.mrt");
}
}- Each
Viewergets its ownStiReport, so the two dashboards render and operate independently. - The components share no state — loading or interacting with one does not affect the other.
How it works. The viewer is a self-contained component, so any number can be placed on a page, each with a separate dashboard.