This is a migrated thread and some comments may be shown as answers.

Assigning List to a Table

1 Answer 11 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vivek
Top achievements
Rank 1
Vivek asked on 11 Mar 2013, 08:22 AM
Hi,

Find the Screenshot for My report structure.
My Report is in seperate Class Library.

In my XAML.cs

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; }
        }
    }
}


 know that problem is with my bindings.

I have attached my output also.
Please let me know the soultion for my problem.

1 Answer, 1 is accepted

Sort by
0
Accepted
Elian
Telerik team
answered on 12 Mar 2013, 04:42 PM
Hello Vivek,

The property path is case-sensitive and the it should be "DataSource" instead of "dataSource". In order to avoid making typos you can select the properties from the drop-down list. 
 

All the best,
Elian
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

Tags
General Discussions
Asked by
Vivek
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or