From 423cdc3d3540d900a445fa7bd3187c485c93360c Mon Sep 17 00:00:00 2001 From: Kojo Date: Tue, 16 Apr 2024 14:00:17 +0200 Subject: [PATCH] =?UTF-8?q?BetreutesWohnenStLudgerus=20/=20Inclusio:=20Cat?= =?UTF-8?q?egory-Filter=20ber=C3=BCcksichtigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomReportCreator.cs | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/ReportImp/BetreutesWohnenStLudgerus/CustomReportCreator.cs b/ReportImp/BetreutesWohnenStLudgerus/CustomReportCreator.cs index f080c97a7..0038620f1 100644 --- a/ReportImp/BetreutesWohnenStLudgerus/CustomReportCreator.cs +++ b/ReportImp/BetreutesWohnenStLudgerus/CustomReportCreator.cs @@ -14,7 +14,7 @@ namespace Inclusio { public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay) { - List lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay); + List lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid); if (lROs.Count > 0) { @@ -46,7 +46,37 @@ namespace Inclusio var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid); return CreateServicesOverviewReportForRo(ro, serviceCategoryOid); - } + } + + public override XtraReport CreateServiceOverviewReportForCustomers(IList customerOids, int month, int year, long? orgaOid, long? empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende) + { + var roList = new List(); + + foreach (var coid in customerOids) + { + var ro = ServicesOverviewRO.Create(coid, month, year, true, orgaOid ?? 0, empOid ?? 0, startDay, endDay, serviceCategoryOid); + if (ro != null) + { + roList.Add(ro); + } + } + + if (roList.Count > 0) + { + var rootReport = CreateServicesOverviewReportForRo(roList[0], serviceCategoryOid); + rootReport.CreateDocument(); + for (int i = 1; i < roList.Count; i++) + { + var lNext = CreateServicesOverviewReportForRo(roList[i], serviceCategoryOid); + lNext.CreateDocument(); + rootReport.Pages.AddRange(lNext.Pages); + } + + return rootReport; + } + + return new XtraReport(); + } private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid) {