Sajid Hussain

Sajid Hussain

  • 1.2k
  • 514
  • 100k

How Do I Design Rdlc For This Requirement

Jun 19 2015 1:33 AM
i have two table in sql DB named as Rsector and Psector,Rsector link with psector via forign key ,
i have created two dataset in rdlc, now using following code i am getting the values
 
 rssreport = _service.GetRouteSectorStatusByNewRoute_Id(route).Where(x => x.RouteSectorStatusDate == dt).ToList();                 foreach (var rssr in rssreport)                 {                     var emp = _service.GetAllEmployee().Where(x => x.Id == rssr.Employee_Id).FirstOrDefault();                     dataset.RouteStw.Rows.Add(                         rssr.RouteSectorName,                         emp.Name,                         emp.Id,                         emp.CellNo,                         rssr.SectorName                                                 );                       var rtpnt = _service.GetRoutePointStatusByNewRoute_Id(route).Where(x => x.RouteSector_Id == rssr.RouteSector_Id && x.Date == dt && x.NewRoute_Id==route).ToList();                     foreach (var rps in rtpnt)                     {                         var emp1 = _service.GetAllEmployee().Where(x => x.Id == rps.Employee_Id).FirstOrDefault();                         dataset.RoutePoint.Rows.Add(                             rps.AddRoutePointName,                             emp1.Name,                             emp1.Id,                             emp1.CellNo,                             rps.SectorName                               );                     }                                      }
and output is as follow,

RSname    empid cellNo sector
 sss 12 mmm dd
 fff 13 mmm ff
 eee 14 mmm gg
 AND Point
 pntName empid cellno sector
 www 43 vvv 1
 wer 22 rrr 1
ttt 12 ggg 1
and my requirment is
RSname    empid cellNo sector
 sss 12 mmm dd
 pntName empid cellno sector
 www 43 vvv 1
wer 22 rrr 1
 ttt 12 ggg 1
mean first details of one sector then point of that sector,
then second sector then point of second sector