using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            var reportModel = myData();
            var masterReport1 = new MasterReport1();
            masterReport1.DataSource = reportModel;
            var subReport1 = (Telerik.Reporting.SubReport)masterReport1.Items.Find("subReport1", true)[0];
            subReport1.ReportSource.DataSource = reportModel.Details;
            ReportViewer1.Report = masterReport1;
        }

        private Actuacion myData()
        {
            var details = new List<Details>();
            var detail1 = new Details(){Detail = "Detail1"};
            var detail2 = new Details(){Detail = "Detail1"};
            details.Add(detail1);
            details.Add(detail2);
            
            var actuacion = new Actuacion()
            {
                Name = "myActuacion",
                Details = details
            };

            return  actuacion;
        }
    }
}
