From c931802beaf094ac6fcf9db7907bceecc6d9bbf7 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 22 Feb 2018 13:24:32 +0000 Subject: [PATCH] B2018-037: Improve end message location when end message is too low on page based on data on page --- PROMS/Volian.Print.Library/vlnParagraph.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 0710dfe7..b902d367 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2227,7 +2227,13 @@ namespace Volian.Print.Library if (myMsg.Contains("%-12s")) myMsg = myMsg.Replace("%-12s", MyItemInfo.MyProcedure.DisplayNumber.PadRight(12)); float xpos = 0; - if (yTopMargin - docstyle.Layout.PageLength >= msg_yLocation && docstyle.End.Message != null && docstyle.End.Message != "" && docstyle.End.Flag <= 2) _MyLog.WarnFormat("End Message LOW on page: {0}, {1}, {2}, Page {3}", msg_yLocation, MyItemInfo.ItemID, MyItemInfo.ShortPath, MyPageHelper.CurrentPageNumber + 1); + if (yTopMargin - docstyle.Layout.PageLength >= msg_yLocation && docstyle.End.Message != null && docstyle.End.Message != "" && docstyle.End.Flag <= 2) + { + // B2018-037: adjust location of end message to bottom of page if it is too low. This occurs when data just doesn't + // fit on the page, but will locate end message at a more reasonable location. + msg_yLocation = (float)yTopMargin - (float)docstyle.Layout.PageLength; + _MyLog.WarnFormat("End Message LOW on page: {0}, {1}, {2}, Page {3}", msg_yLocation, MyItemInfo.ItemID, MyItemInfo.ShortPath, MyPageHelper.CurrentPageNumber + 1); + } if ((docstyle.End.Margin ?? 0) != 0) { xpos = (float)docstyle.Layout.LeftMargin + (float)docstyle.End.Margin;