private void SetHeaderFooterText(bool IsHeader, SLHeaderFooterTypeValues Type, SLHeaderFooterSectionValues Section, string Text)
        {
            string result = TranslateToInternalCode(Text);
            string sLeft = string.Empty, sCenter = string.Empty, sRight = string.Empty;
            if (IsHeader)
            {
                if (Type == SLHeaderFooterTypeValues.Even) this.SplitHeaderFooterText(this.EvenHeaderText, out sLeft, out sCenter, out sRight);
                else if (Type == SLHeaderFooterTypeValues.First) this.SplitHeaderFooterText(this.FirstHeaderText, out sLeft, out sCenter, out sRight);
                else this.SplitHeaderFooterText(this.OddHeaderText, out sLeft, out sCenter, out sRight);
            }
            else
            {
                if (Type == SLHeaderFooterTypeValues.Even) this.SplitHeaderFooterText(this.EvenFooterText, out sLeft, out sCenter, out sRight);
                else if (Type == SLHeaderFooterTypeValues.First) this.SplitHeaderFooterText(this.FirstFooterText, out sLeft, out sCenter, out sRight);
                else this.SplitHeaderFooterText(this.OddFooterText, out sLeft, out sCenter, out sRight);
            }

            if (Section == SLHeaderFooterSectionValues.Left) sLeft = result;
            else if (Section == SLHeaderFooterSectionValues.Right) sRight = result;
            else sCenter = result;

            result = string.Empty;

            if (sLeft.Length > 0) result += "&L" + sLeft;
            if (sCenter.Length > 0) result += "&C" + sCenter;
            if (sRight.Length > 0) result += "&R" + sRight;

            if (IsHeader)
            {
                if (Type == SLHeaderFooterTypeValues.Even) this.EvenHeaderText = result;
                else if (Type == SLHeaderFooterTypeValues.First) this.FirstHeaderText = result;
                else this.OddHeaderText = result;
            }
            else
            {
                if (Type == SLHeaderFooterTypeValues.Even) this.EvenFooterText = result;
                else if (Type == SLHeaderFooterTypeValues.First) this.FirstFooterText = result;
                else this.OddFooterText = result;
            }
        }
        private string GetHeaderFooterText(bool IsHeader, SLHeaderFooterTypeValues Type, SLHeaderFooterSectionValues Section)
        {
            string result = string.Empty;
            string sLeft = string.Empty, sCenter = string.Empty, sRight = string.Empty;
            if (IsHeader)
            {
                if (Type == SLHeaderFooterTypeValues.Even) this.SplitHeaderFooterText(this.EvenHeaderText, out sLeft, out sCenter, out sRight);
                else if (Type == SLHeaderFooterTypeValues.First) this.SplitHeaderFooterText(this.FirstHeaderText, out sLeft, out sCenter, out sRight);
                else this.SplitHeaderFooterText(this.OddHeaderText, out sLeft, out sCenter, out sRight);
            }
            else
            {
                if (Type == SLHeaderFooterTypeValues.Even) this.SplitHeaderFooterText(this.EvenFooterText, out sLeft, out sCenter, out sRight);
                else if (Type == SLHeaderFooterTypeValues.First) this.SplitHeaderFooterText(this.FirstFooterText, out sLeft, out sCenter, out sRight);
                else this.SplitHeaderFooterText(this.OddFooterText, out sLeft, out sCenter, out sRight);
            }

            if (Section == SLHeaderFooterSectionValues.Left) result = sLeft;
            else if (Section == SLHeaderFooterSectionValues.Right) result = sRight;
            else result = sCenter;

            result = TranslateToUserFriendlyCode(result);

            return result;
        }