Load the report template in .NET 8.0, assign its variables from application code, and continue with rendering.

Supplying values. Load the template, resolve its variables, assign the application values, and render or display the updated report.
var report = new StiReport();
report.Load(@"Reports\Variables.mrt");
report.Compile();

report["Name"] = TextBoxName.Text;
report["Surname"] = TextBoxSurname.Text;
report["Email"] = TextBoxEmail.Text;
report["Sex"] = RadioButtonMale.IsChecked.GetValueOrDefault();

report.ShowWithWpf();
The indexer (report["Name"]) reads and writes report variables by name. Values are assigned after Compile() and before rendering, so the report is generated with exactly the data your application supplies.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.