This example shows how to change the viewer options. First, load scripts:
@using Stimulsoft.Base
@using Stimulsoft.Report
@using Stimulsoft.Report.Blazor
@using Stimulsoft.Report.Web
Next, add report viewer:
<!--Report Viewer-->
<StiBlazorViewer Report="@Report" Options="@Options"
Width="650" Height="650"
Theme="StiViewerTheme.Office2013WhiteCarmine" />
After that, initialize options object:
@code
{
private StiReport Report;
private StiBlazorViewerOptions Options;
protected override void OnInitialized()
{
base.OnInitialized();
this.Options = new StiBlazorViewerOptions();
...
Finally, set some options, create empty report object and load report template:
...
this.Options.Appearance.FullScreenMode = true;
this.Options.Appearance.ScrollbarsMode = true;
this.Options.Toolbar.ShowOpenButton = false;
this.Options.Toolbar.DisplayMode = StiToolbarDisplayMode.Separated;
this.Report = new StiReport();
this.Report.Load("Reports/TwoSimpleLists.mrt");
}
}
Auf dem Screenshot unten Sie können das Ergebnis des Beispiel-Codes ansehen: