Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hello,
I currently have a ReportDataSource which i get the information i need from my stored procedure to display it in a reporting form. The return format is a table that will be filled in with content. Since this is based on Schools and Classes which means for each school a table will be returned with the list of classes offered in that school.
I am currently getting the data but my code is generating a table for each Class and not for each School. so if i have 5 classes my code returns 5 tables each with the same school name but different class name with in - i want it to be the other way around. Here is my current code:

C#
public ReportDataSource GetSchools(DateTime? beginDate, DateTime? endDate, int schoolId)
        {
            var report = _schoolSummaryRepository.GetSchoolSummaryClass(beginDate, endDate, schoolId);
            return new ReportDataSource("SchoolReport", report);
        }


I tried using a foreach loop but the result is i get empty tables without school or class names
Posted

1 solution

It is difficult to answer your question with this code snippet. You need to elaborate more!. But what I will suggest you to use Debugging technique[^] efficiently.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900