Designer Events
The Blazor Designer component supports events which allows you to execute necessary operations before certain actions, such as creating and editing report templates, previewing, printing and exporting, interactivity and etc. Below is a sample for processing designer events.
Index.razor |
@using Stimulsoft.Report @using Stimulsoft.Report.Blazor @using Stimulsoft.Report.Web
<StiBlazorDesigner Report="@Report" OnPreviewReport="@OnPreviewReport"/>
@code { //Report object to use in designer private StiReport Report;
protected override void OnInitialized() { base.OnInitialized();
//Create empty report object var report = new StiReport();
//Load report template report.Load("Reports/TwoSimpleLists.mrt");
//Assing report object to designer Report = report; }
private void OnPreviewReport(StiReportDataEventArgs args) { //Load new data from XML file var data = new System.Data.DataSet(); data.ReadXml("Data/Demo1.xml");
args.Report.RegData(data); } } |
Events list
|