Creating hierarchical/custom model in SSRS

折月煮酒 提交于 2019-12-11 17:50:11

问题


I am generating a report where I have to bind a hierarchical structure.

1) I have to show teachers 1 by 1 in a row but following each teacher, there should be multiple students listed in another table type structure and after the listing of students

2) It is having another table type structure showing blah blah information

Now as per surfing internet i have found that i can achieve this result by creating a custom model like this:

I will have a custom class

public class customDataSet
{
List<listing> obj = new List<listing>
}

class listing
{
   public int teacherid;
   public string name;
   public string age;
   List<students> obj1 = new List<students>();
   List<blahblah> obj2 = new List<blahblah>();
}

So, I will have to bind my RDLC with customDataSet. But now how can I show this hierarchical. I mean which control should i use?

Structure should show like this

|TeacherId     |Name    |AGE
---------------+--------+----
|1             |Rocky   |5

Here will be a another table that will show student info like

|studentId   |Name     |Age
-------------+---------+----
|23          |Sandy    |23
|24          |Latin    |34

and this should repeat


回答1:


You should [probably] use Tablix control with grouping. Here is everything about groups in RDLC reports.

Not sure how familiar you are with RDLC reports in general, so maybe you will find more useful info about tables here. Here is also general info about report design.



来源:https://stackoverflow.com/questions/45356016/creating-hierarchical-custom-model-in-ssrs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!