or
using System.Collections.Generic;
using System.Linq;
using Telerik;
using Telerik.Reporting;
namespace MyReport
{
public partial class MainWindow
{
public MainWindow()
{
InitializeComponent();
var project = new List<
Project
>();
var pro = new Project {Name = "Name One", Nos = new List<
int
> {1, 2, 3, 4, 5}};
project.Add(pro);
pro = new Project {Name = "Name Two", Nos = new List<
int
> {1, 2, 3, 4, 5}};
project.Add(pro);
var reportSource = new InstanceReportSource {ReportDocument = new SampleReport()};
reportSource.ReportDocument.Reports.FirstOrDefault(rep => rep.Name == "SampleReport").DataSource =
project;
reportViewer1.ReportSource = reportSource;
}
private class Project
{
public string Name { get; set; }
public List<
int
> Nos { get; set; }
}
}
}