diff --git a/PROMS/Volian.Print.Library/Grid2Pdf.cs b/PROMS/Volian.Print.Library/Grid2Pdf.cs index 5d269cf6..faa5d285 100644 --- a/PROMS/Volian.Print.Library/Grid2Pdf.cs +++ b/PROMS/Volian.Print.Library/Grid2Pdf.cs @@ -396,7 +396,7 @@ namespace Volian.Print.Library // B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13 // Tables not being scrunched properly // Merged cells should be adjusted based upon the bottom most cell of the range - MyTable.HContents[r] = 12; + if(MyTable.HContents[r]==0) MyTable.HContents[r] = 12; if (cr.r2 == r && cr.c1 == c)// Use last Row { float w = MyTable.ColLeft[cr.c2 + 1] - MyTable.ColLeft[cr.c1]; @@ -495,10 +495,10 @@ namespace Volian.Print.Library // B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13 // Tables not being scrunched properly // Merged cells should be adjusted based upon the bottom most cell of the range - else if(cr.r2 == r) - hMax = Math.Max(hMax, hContent- MyTable.HContents[r-1]); - else - hMax = Math.Max(hMax, hContent - (cr.r2 - cr.r1) * _SixLinesPerInch); + else if(cr.r2 == r) // Adjust for Previous rows within merged cells + hMax = Math.Max(hMax, hContent- SumContents(cr.r1,cr.r2)); + //else + // hMax = Math.Max(hMax, hContent - (cr.r2 - cr.r1) * _SixLinesPerInch); if (hContent > h) { // RHM20150429 - Table Scrunch //if (ShowDetails) Console.WriteLine("Less {0},{1},{2},{3},{4},{5}", r, c, posBefore, posAfter, hContent, hMax); @@ -509,13 +509,25 @@ namespace Volian.Print.Library //if (ShowDetails) Console.WriteLine("Greater{0},{1},{2},{3},{4},{5}", r, c, posBefore, posAfter, hContent, hMax); //if (c == MyFlexGrid.Cols.Count - 1) //MyTable.AdjustRowTop(cr.r1, cr.r2, hMax + 6); - MyTable.HContents[cr.r2] = hMax+2; + //B2018-033 - Adjuust current row + MyTable.HContents[r] = hMax+2; } Add(new vlnCell(cr.r1, cr.c1, cr.r2, cr.c2, MyTable, myPara,hContent)); } } } + // This summarizes the Content heights per row + //int i=0; + //foreach (float h in MyTable.HContents) + // Console.WriteLine("{0}\t{1}", ++i, h); + } + private float SumContents(int first, int last) + { + float total = 0; + for (int i = first; i < last; i++) + total += MyTable.HContents[i]; + return total; } // B2017-105 if a symbol character was set to a bigger font size, then the positioning of the larger symbol character was printing too high on the line