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

How to pass data to report

1 Answer 179 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ashley Slaughter
Top achievements
Rank 1
Ashley Slaughter asked on 08 Dec 2009, 12:30 AM
I have a Silverlight application that shows employee data (last name, first name, etc).  The data is contained in List<Employee>.  I need to set the DataSource of the report to this list.  How do I do it?

1 Answer, 1 is accepted

Sort by
0
Ryan Overton
Top achievements
Rank 2
answered on 08 Dec 2009, 08:08 PM
Ashley,

The only place you can assign a data source for the report is through the "NeedDataSource" event of the report.

private

 

void report1_NeedDataSource(object sender, EventArgs e)

 

 

 

 

    Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender;     

    //TODO: Set the charts Data Source  

 

    procChart.DataSource = employeeList;
}

Hope this helps,
Ryan

Tags
General Discussions
Asked by
Ashley Slaughter
Top achievements
Rank 1
Answers by
Ryan Overton
Top achievements
Rank 2
Share this question
or