B2018-037: Improve end message location when end message is too low on page based on data on page

This commit is contained in:
Kathy Ruffing 2018-02-22 13:24:32 +00:00
parent c23fcb9435
commit c931802bea

View File

@ -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;