diff --git a/PROMS/VEPROMS User Interface/AboutVEPROMS.cs b/PROMS/VEPROMS User Interface/AboutVEPROMS.cs index df812c2c..ab22efb7 100644 --- a/PROMS/VEPROMS User Interface/AboutVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/AboutVEPROMS.cs @@ -40,6 +40,7 @@ namespace VEPROMS this.labelCompanyName.Links[0].LinkData = "Volian Enterprises Inc."; this.labelCompanyName.Links.Add(0,23,"www.volian.com"); this.labelServer.Text = string.Format("SQL Server: {0}", server); + if (databaseName == null) databaseName = Regex.Replace(connectionString, "^.*Initial Catalog=([^;]*);.*$", "$1", RegexOptions.IgnoreCase); this.labelDatabase.Text = string.Format("Database: {0}", databaseName); } diff --git a/PROMS/Volian.Controls.Library/frmSendErrorLog.cs b/PROMS/Volian.Controls.Library/frmSendErrorLog.cs index 7745d41f..569f68df 100644 --- a/PROMS/Volian.Controls.Library/frmSendErrorLog.cs +++ b/PROMS/Volian.Controls.Library/frmSendErrorLog.cs @@ -121,6 +121,7 @@ namespace Volian.Controls.Library if (server.StartsWith(@".\")) server = @"Local \ " + server.Substring(2); string databaseName = Database.SelectedDatabase; sb.Append(string.Format("SQL Server: {0}", server)); + if (databaseName == null) databaseName = Regex.Replace(connectionString, "^.*Initial Catalog=([^;]*);.*$", "$1", RegexOptions.IgnoreCase); sb.AppendLine(string.Format("\t\tDatabase: {0}", databaseName)); if (OutlookEmail) sb.AppendLine("sent via outlook"); diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index eb40deb5..183594a4 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -326,7 +326,7 @@ namespace Volian.Print.Library //_MyLog.ErrorFormat("<<< ERROR >>> Forced Pagination - ItemID = {0}\r\nLocation = '{1}'", MyItemInfo.ItemID, MyItemInfo.ShortPath); _MyLog.ErrorFormat("<<< ERROR >>> Forced Pagination\r\n==>'Forced Pagination',{0},'{1}','{2}'" , MyItemInfo.ItemID, MyItemInfo.MyDocVersion.MyFolder.Name, MyItemInfo.ShortPath); - DebugPagination.WriteLine("=====>,'Yes','Forced Pagination',{0},{1},,{3},{4}", MyItemInfo.ItemID, YSize, 0, yLocation, MyItemInfo.DBSequence); + DebugPagination.WriteLine("=====>,'Yes','Forced Pagination',{0},{1},,{3},'{4}'", MyItemInfo.ItemID, YSize, 0, yLocation, MyItemInfo.ShortPath); retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo, yBottomMargin); } private void ShowPageBreak(int instance, string message, string breakOrNot, float YSize, float yPageSize, float yWithinMargins, bool manualPageBreak) @@ -433,12 +433,20 @@ namespace Volian.Print.Library { // If the next page break is beyond the next hls/caution/note, use the next // hls/caution/note. - if (PageBreakOnStepList[0].YTop <= paraBreak.YTop || PageBreakOnStepList[0].YSize - yTop <= ySpaceOnCurPage) + if (PageBreakOnStepList[0].YTop <= paraBreak.YTop ) { paraBreak = PageBreakOnStepList[0]; PageBreakOnStepList.RemoveAt(0); yTopNew = paraBreak.YTop - YTopMost; } + // The following code caused forced pagination for Catawba EOP BG - EP/1/A/5000/FR-C.1.SC..S16..N2..S4..S1. + //else if(PageBreakOnStepList[0].YSize - yTop <= ySpaceOnCurPage) + //{ + // DebugPagination.WriteLine("======>>>>> Other Condition"); + // paraBreak = PageBreakOnStepList[0]; + // PageBreakOnStepList.RemoveAt(0); + // yTopNew = paraBreak.YTop - YTopMost; + //} } RemoveProcessedParagraphs(myList, yTopNew - yTop); yTop = yTopNew;