diff --git a/src/Phoenix.Services/Handlers/Reports/Queries/GetPlcReportHandler.cs b/src/Phoenix.Services/Handlers/Reports/Queries/GetPlcReportHandler.cs index 232457d..63c63fa 100644 --- a/src/Phoenix.Services/Handlers/Reports/Queries/GetPlcReportHandler.cs +++ b/src/Phoenix.Services/Handlers/Reports/Queries/GetPlcReportHandler.cs @@ -125,7 +125,7 @@ private static void CreateResultSheets(ExcelWorksheets sheets, IReadOnlyCollecti private static void SetResultSheetHeaders(ExcelWorksheet sheet, DateOnly date, string locationName, ITypeProcessor typeProcessor) { sheet.Cells[1, 1, 1, sheet.Dimension.Columns].Merge = true; - sheet.Cells[3, 1].Value = typeProcessor.GetLegend(); + sheet.Cells[typeProcessor.LegendRow, 1].Value = typeProcessor.GetLegend(); ExcelRange headerCell = sheet.Cells[1, 1]; headerCell.Value = typeProcessor.GetHeader(locationName, date); diff --git a/src/Phoenix.Services/Reports/Base/ITypeProcessor.cs b/src/Phoenix.Services/Reports/Base/ITypeProcessor.cs index 3cf8dfd..e1d8f2e 100644 --- a/src/Phoenix.Services/Reports/Base/ITypeProcessor.cs +++ b/src/Phoenix.Services/Reports/Base/ITypeProcessor.cs @@ -8,6 +8,7 @@ namespace Phoenix.Services.Reports.Base internal interface ITypeProcessor { ushort DeviceNameRow { get; } + ushort LegendRow { get; } ushort RemoveTemplateRowCount { get; } ushort StartingRow { get; } diff --git a/src/Phoenix.Services/Reports/Base/TypeProcessorBase.cs b/src/Phoenix.Services/Reports/Base/TypeProcessorBase.cs index 5fd7f4f..43c4420 100644 --- a/src/Phoenix.Services/Reports/Base/TypeProcessorBase.cs +++ b/src/Phoenix.Services/Reports/Base/TypeProcessorBase.cs @@ -3,11 +3,13 @@ namespace Phoenix.Services.Reports.Base internal abstract class TypeProcessorBase { public ushort DeviceNameRow { get; } + public ushort LegendRow { get; } public ushort StartingRow { get; } public TypeProcessorBase() { DeviceNameRow = 3; + LegendRow = 3; StartingRow = 8; } }