A report's data can be supplied entirely from code. This example builds a dataset from JSON and registers it with the report before showing it.

Preparing the data. Read or create the data source, register it in the report dictionary, synchronize the schema, and render with the supplied records.
private void ShowReport(DataSet dataSet)
{
    var report = new StiReport();
    report.Load(@"Reports\TwoSimpleLists.mrt");
    report.Dictionary.Databases.Clear();
    report.RegData("Demo", dataSet);
    report.ShowWithWpf();
}

// build the data (here from a JSON file) and show it
var dataSet = StiJsonToDataSetConverterV2.GetDataSetFromFile(@"Data\Demo.json");
ShowReport(dataSet);
RegData makes the object available to the report engine, and Dictionary.Databases.Clear() removes the template's design-time connections so only your run-time data is used.

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