I have just upgraded a reporting project that is several years old and I see that there have been some breaking changes in the reporting structure.
I several sub reports inside of a report. The datasource to each one is determined dynamically inside of the Ctor of the report itself.
How would I accomplish this within the new model? Any help would be greatly appreciated.
public ClaimsReport()
{
InitializeComponent();
BindToSubReport(1, subReport_Sacramento);
BindToSubReport(2, subReport_Modesto);
BindToSubReport(3, subReport_Fresno);
}
public void BindToSubReport(int officeID, SubReport subReport)
{
using (eEntities context = new eEntities ()) {
List<StrapReportClaimOutput> outputList = context.StrapReportClaimOutputs
.Where(x => x.OfficeID.Equals(officeID))
.OrderByDescending(o => o.TotalDocketing)
.ToList();
subReport.ReportSource.DataSource = outputList;
}
}
I several sub reports inside of a report. The datasource to each one is determined dynamically inside of the Ctor of the report itself.
How would I accomplish this within the new model? Any help would be greatly appreciated.
public ClaimsReport()
{
InitializeComponent();
BindToSubReport(1, subReport_Sacramento);
BindToSubReport(2, subReport_Modesto);
BindToSubReport(3, subReport_Fresno);
}
public void BindToSubReport(int officeID, SubReport subReport)
{
using (eEntities context = new eEntities ()) {
List<StrapReportClaimOutput> outputList = context.StrapReportClaimOutputs
.Where(x => x.OfficeID.Equals(officeID))
.OrderByDescending(o => o.TotalDocketing)
.ToList();
subReport.ReportSource.DataSource = outputList;
}
}