Report variables receive values from the application — text boxes, date pickers, checkboxes — assigned by name before rendering.

Assign variables by name. Load the report, then set each variable through the report indexer:
var report = new StiReport();
report.Load(AssetLoader.Open(new Uri("avares://…/Variables.mrt")));

report["Name"]     = tbName.Text;
report["Surname"]  = tbSurname.Text;
report["Email"]    = tbEmail.Text;
report["Sex"]      = rbMale.IsChecked.GetValueOrDefault();
report["BirthDay"] = dtBirthDay.SelectedDate.GetValueOrDefault().DateTime;

How it works. Values are assigned before rendering, so the report is generated with exactly the data the user entered in the Avalonia UI.

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.