diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 68a4d93c..b51c1f83 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -6892,7 +6892,13 @@ namespace VEPROMS.CSLA.Library get { return _StepSectPageBreaksForSupInfo; } set { _StepSectPageBreaksForSupInfo = value; } } - + // Keeps track of step section itemids where page breaks occur + private List _StepSectPageBreaks = null; + public List StepSectPageBreaks + { + get { return _StepSectPageBreaks; } + set { _StepSectPageBreaks = value; } + } // Determine if this section contains any Supplemental information steps. This is used for print to determine // whether some of the supinfo processing needs to occur. private bool? _HasSupInfoSteps = null; diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 0bc909de..4116b48a 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -1612,6 +1612,8 @@ namespace Volian.Print.Library { if (section.StepSectPageBreaksForSupInfo == null) section.StepSectPageBreaksForSupInfo = new List(); else section.StepSectPageBreaksForSupInfo.Clear(); + if (section.StepSectPageBreaks == null) section.StepSectPageBreaks = new List(); + else section.StepSectPageBreaks.Clear(); } // 792: 72 * 11 inches - TopRow - Top is high value float _PointsPerPage = 792; diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index f5571271..78e47e2e 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1604,6 +1604,7 @@ namespace Volian.Print.Library if (MyItemInfo.SupInfos != null && MyItemInfo.SupInfos.Count > 0 && aboveSupinfoId > 0) supInfoSect.StepSectPageBreaksForSupInfo.Add(aboveSupinfoId); else if (MyItemInfo.SupInfos != null && MyItemInfo.SupInfos.Count > 0) supInfoSect.StepSectPageBreaksForSupInfo.Add(MyItemInfo.SupInfos[0].ItemID); else MyPromsPrinter.NeedSupInfoBreak = true; + supInfoSect.StepSectPageBreaks.Add(MyItemInfo.ItemID); } YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin); docstyle = MyItemInfo.MyDocStyle; @@ -1699,6 +1700,7 @@ namespace Volian.Print.Library { if (MyItemInfo.SupInfos != null && MyItemInfo.SupInfos.Count > 0) supInfoSect.StepSectPageBreaksForSupInfo.Add(MyItemInfo.SupInfos[0].ItemID); else MyPromsPrinter.NeedSupInfoBreak = true; + supInfoSect.StepSectPageBreaks.Add(MyItemInfo.ItemID); } YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin); docstyle = MyItemInfo.MyDocStyle; @@ -1889,6 +1891,7 @@ namespace Volian.Print.Library { if (MyItemInfo.SupInfos != null && MyItemInfo.SupInfos.Count > 0) supInfoSect.StepSectPageBreaksForSupInfo.Add(MyItemInfo.SupInfos[0].ItemID); else MyPromsPrinter.NeedSupInfoBreak = true; + supInfoSect.StepSectPageBreaks.Add(MyItemInfo.ItemID); } if (!firstHighLevelStep) { @@ -2161,7 +2164,8 @@ namespace Volian.Print.Library } return -1; } - // Find the step that has supplemental information from this step down page until a preferred page break is found. + // Find the step that has supplemental information from this step down page until a preferred page break is found + // or a regular page break. // It is used to determine whether there is a supinfo facing page or if there should be a blank page. private int GetIdThatHasSupInfoItems(ItemInfo ii, int startid) { @@ -2172,6 +2176,8 @@ namespace Volian.Print.Library ItemInfo sib = ii.NextItem; while (sib != null) { + SectionInfo supInfoSect = ii.MyActiveSection as SectionInfo; + if (supInfoSect.StepSectPageBreaks.Contains(sib.ItemID)) return -1; if (sib.SupInfos != null && sib.SupInfos.Count > 0) return sib.SupInfos[0].ItemID; id = GetSubThatHasSupInfoItems(sib, startid); if (id != -1) return id;