diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 667b4802..6f33b2b8 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -13,6 +13,7 @@ namespace Volian.Print.Library { public class VlnSvgPageHelper:SvgPageHelper { + private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); // This handles Page Breaks within a Step private List _ParaBreaks = new List(); public List ParaBreaks @@ -350,6 +351,7 @@ namespace Volian.Print.Library private static Regex regexFindToken = new Regex("{[^{}]*}"); private string mySvg_ProcessText(object sender, SvgProcessTextArgs args) { + if (args.MyText == null) return string.Empty; // KBR needed for WCN crash if (!args.MyText.Contains("{")) return args.MyText; /* @@ -408,6 +410,17 @@ namespace Volian.Print.Library private string BuildMyText(VEPROMS.CSLA.Library.FormatInfo activeFormat) { string sGenMac = activeFormat.GenMac; + if (sGenMac == null || sGenMac == "") + { + // If subformat and does not have its own genmac, find an inherited genmac. + FormatInfo tmpf = FormatInfo.Get(activeFormat.ParentID); + while (tmpf.FormatID!=1 && (sGenMac==null||sGenMac=="")) + { + sGenMac = tmpf.GenMac; + tmpf = FormatInfo.Get(tmpf.ParentID); + } + if (sGenMac == null || sGenMac == "") return ""; + } if (!sGenMac.Contains("xmlns")) sGenMac = sGenMac.Replace("