Created
July 24, 2020 15:22
-
-
Save sitefinitysteve/0df7bdd96c06f0aaa2905f00b4433cc9 to your computer and use it in GitHub Desktop.
/blog/code/2012/03/16/telerik-reporting-needsdatasource
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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