A report can be built entirely in code under Avalonia — pages, bands and components are objects you create.

Building the report. Construct the report hierarchy in code, configure the required objects, add them to the template, and render the result.
var report = new StiReport();
report.RegData(dataSet1);
report.Dictionary.Synchronize();
var page = report.Pages[0];

var headerBand = new StiHeaderBand();
var headerText = new StiText(new RectangleD(0, 0, 5, 0.5));
headerText.HorAlignment = StiTextHorAlignment.Center;
headerText.Brush = new StiSolidBrush(Color.LightGreen);
headerBand.Components.Add(headerText);

var dataBand = new StiDataBand();
dataBand.Components.Add(new StiText(new RectangleD(0, 0, 5, 0.5)));

page.Components.Add(headerBand);
page.Components.Add(dataBand);
Every element you would place in the designer has a corresponding class, so a report can be generated dynamically. Data is loaded through Avalonia's AssetLoader and registered with RegData before rendering.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.