Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sitefinitysteve/0df7bdd96c06f0aaa2905f00b4433cc9 to your computer and use it in GitHub Desktop.
Save sitefinitysteve/0df7bdd96c06f0aaa2905f00b4433cc9 to your computer and use it in GitHub Desktop.
/blog/code/2012/03/16/telerik-reporting-needsdatasource
private void crosstab1_NeedDataSource(object sender, EventArgs e) {
Telerik.Reporting.Processing.Table procReport = (Telerik.Reporting.Processing.Table)sender;
List<Response> submissions = (from s in context.Responses
where s.Submission.FormID == new Guid("6F38E890-6FFE-4F50-A8B5-8C5FDADDAF31")
select s).ToList();
var formatted = (from s in submissions
select new {
Submission = s.Submission,
SubmissionID = s.SubmissionID,
UserID = s.Submission.Userid,
SubmissionDate = s.Submission.Submitted,
FormID = s.Submission.FormID,
QuestionText = s.Question.GetQuestionText("EN", context),
AnswerText = s.Answertext,
AnswerNumeric = s.Answernumeric
});
procReport.DataSource = formatted;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment