Customizing the Viewer
Our sample projects and report templates can help you learn the basics of working with our products.The viewer toolbar and export options can be trimmed to expose only the features you want. This example hides the Open button and the PDF export.
Viewer setup. Configure the viewer, load the report, assign it to the component, and process the requests or events raised by the UI.
Viewer setup. Configure the viewer, load the report, assign it to the component, and process the requests or events raised by the UI.
@Component({
selector: "customizing-the-viewer",
imports: [Viewer],
template: `<sti-viewer [report]="report" [options]="viewerOptions"></sti-viewer>`
})
export class CustomizingTheViewer {
report = new Stimulsoft.Report.StiReport();
viewerOptions = new Stimulsoft.Viewer.StiViewerOptions();
constructor() {
this.report.loadFile("Reports/SimpleList.mrt");
this.viewerOptions.toolbar.showOpenButton = false;
this.viewerOptions.exports.showExportToPdf = false;
}
}The toolbar and exports option groups switch individual buttons and export formats on and off, from a full-featured viewer to a minimal one.