Hello,
Since my previous post, we've been evaluating the functionalities of the designer.
One of our main requirement is to display data as crosstabs.
We intend to use a WebServiceDataSource to fetch the data as JSON so that the report will only have to display them, without having to make any calculations or containing business rules.
I've included the JSON sample that I'm using below. As you can see, we have a school, which contains classes, which contains a list of students and a list of subjects. Each student has evaluations : a grade in one of the subject of the class. Each subject has a display order and a grade average of the class.
Each report page must display one class with a crosstab. The crosstab must display the grades of each students for each subjects.
Now, I struggle to show the following information (in yellow in the screenshot below) :
- The room number of the class should be located in the header, but I can't get to it from the header since the class is part of the list and not the header.
- The subjects should be on the Y-axis with :
- The subject label on the crosstable header, ordered by it's display order
- For each student line, the grade corresponding to the subject should be displayed
For each subject, the average class (from the JSON) should be displayed at the bottom of the crossbar
Some information :
- For the purpose of this report, I've used a JSON inline datasource.
- I succeeded to show the grade for each student by flattening the data into rows of student-subject-grade inside the class and grouping inside the crosstab. But this solution doesn't suits us because it duplicates data for each student (name, surname,..) and each subject.
- Though, I still couldn't show the class average from the JSON for each subject.
- We don't want to use a subreport.
I'd be glad if you could advise me on the best way to solve those issues.
Also, I've two additional questions :
- In a crosstab cell which contains a textbox, is it possible, under some conditions (Conditional formatting ?), to show something else instead of the textbox ? For example, sometimes a student doesn't take a subject. In this case, for this student, we'd like to include a diagonal lines through the whole cell.
- The Data Explorer doesn't show the drilled information such as the students values and their evaluations. Since those are a great help at design time, isn't there a way to display those ?
Thanks a lot for your help and I can provide more information if needed or if something is unclear.
Here's the JSON which is the main Datasource. Also, I'm attaching the .trdx (in the .zip) to this post.
{ "schoolName": "Muggle School", "schoolImage": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=", "classes": [ { "name": "East123", "roomNumber": 10, "studentAmount": 3, "students": [ { "id": 12345, "name": "Snow", "surname": "John", "evaluations": [ { "subjectCode": "ENGL", "grade": 6 }, { "subjectCode": "FREN", "grade": 3 }, { "subjectCode": "MATH", "grade": 5.5 } ] }, { "id": 12346, "name": "Potter", "surname": "Harry", "evaluations": [ { "subjectCode": "ENGL", "grade": 4 }, { "subjectCode": "FREN", "grade": 4.5 }, { "subjectCode": "MATH", "grade": 4.5 } ] }, { "id": 12347, "name": "Parker", "surname": "Peter", "evaluations": [ { "subjectCode": "ENGL", "grade": 5 }, { "subjectCode": "FREN", "grade": 5.5 }, { "subjectCode": "MATH", "grade": 6 } ] } ], "subjects": [ { "code": "ENGL", "label": "English", "displayOrder": 2, "classAverage": 5 }, { "code": "FREN", "label": "French", "displayOrder": 3, "classAverage": 4.5 }, { "code": "MATH", "label": "Mathematics", "displayOrder": 1, "classAverage": 5.5 } ] }, { "name": "South123", "roomNumber": 20, "studentAmount": 3, "students": [ { "id": 12348, "name": "Sparrow", "surname": "Jack", "evaluations": [ { "subjectCode": "ENGL", "grade": 6 }, { "subjectCode": "FREN", "grade": 3 }, { "subjectCode": "MATH", "grade": 5.5 } ] }, { "id": 12349, "name": "Black", "surname": "Sirius", "evaluations": [ { "subjectCode": "ENGL", "grade": 4 }, { "subjectCode": "FREN", "grade": 4.5 }, { "subjectCode": "MATH", "grade": 4.5 } ] }, { "id": 12350, "name": "Baggins", "surname": "Frodo", "evaluations": [ { "subjectCode": "ENGL", "grade": 5 }, { "subjectCode": "FREN", "grade": 5.5 }, { "subjectCode": "MATH", "grade": 6 } ] } ], "subjects": [ { "code": "ENGL", "label": "English", "displayOrder": 2, "classAverage": 5 }, { "code": "FREN", "label": "French", "displayOrder": 3, "classAverage": 4.5 }, { "code": "MATH", "label": "Mathematics", "displayOrder": 1, "classAverage": 5.5 } ] } ] }