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

Assigning List to a Table

3 Answers 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vivek
Top achievements
Rank 1
Vivek asked on 07 Mar 2013, 02:25 PM
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; }
        }
    }
}

I know that problem is with my bindings.

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

3 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 07 Mar 2013, 02:35 PM
Hello Vivek,

The binding expression is wrong, it should look like this:
DataSource        =          =Fields.Nos

I hope that helps.

Greetings,
IvanY
the Telerik team

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

0
Vivek
Top achievements
Rank 1
answered on 08 Mar 2013, 04:41 AM
Please Refer the screen Shot.
Still i am not able to get the Nos Lsit in my report.

Regards,
Vivek B
0
Accepted
Hadib Ahmabi
Top achievements
Rank 1
answered on 11 Mar 2013, 01:37 PM
It should be DataSource instead of dataSource. 
Tags
General Discussions
Asked by
Vivek
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Vivek
Top achievements
Rank 1
Hadib Ahmabi
Top achievements
Rank 1
Share this question
or