private void InitializeDisplayElements()
        {
            string[] aNames = null;
            string   columnName;

            lstRunSummaryDisplayElements.Clear();

            for (int i = 0; i < RunSummaryDisplayElementNames.GetLength(0); i++)
            {
                int nSize = RunSummaryDisplayElementNames.GetLength(1);
                if (nSize < 2)
                {
                    continue;
                }

                aNames     = new string[nSize - 1];
                columnName = RunSummaryDisplayElementNames[i, 0];
                for (int j = 0; j < nSize - 1; j++)
                {
                    aNames[j] = String.Empty;
                    aNames[j] = RunSummaryDisplayElementNames[i, j + 1];
                }

                DisplayElement d = new DisplayElement(columnName, aNames);
                lstRunSummaryDisplayElements.Add(d);
            }

            string tableFieldName, displayFieldName;

            lstRunDetailsDisplayElements.Clear();
            for (int i = 0; i < RunDetailsDisplayElementNames.GetLength(0); i++)
            {
                int nSize = RunDetailsDisplayElementNames.GetLength(1);
                if (nSize < 1)
                {
                    continue;
                }
                tableFieldName   = RunDetailsDisplayElementNames[i, 0];
                displayFieldName = RunDetailsDisplayElementNames[i, 1];

                if (string.IsNullOrEmpty(tableFieldName) || string.IsNullOrEmpty(displayFieldName))
                {
                    continue;
                }

                DisplayElement2 d = new DisplayElement2(tableFieldName, displayFieldName);
                lstRunDetailsDisplayElements.Add(d);
            }
        }
        private void SetHeight(ReportObject robj, string fieldName)
        {
            if (robj == null || string.IsNullOrEmpty(fieldName))
            {
                return;
            }

            int nIndex = lstRunSummaryDisplayElements.FindIndex(x =>
            {
                foreach (string s in x.Names)
                {
                    if ((!string.IsNullOrEmpty(s) && s == fieldName))
                    {
                        return(true);
                    }
                }
                return(false);
            });

            int nHeight = 0;

            if (0 <= nIndex)
            {
                DisplayElement de = lstRunSummaryDisplayElements[nIndex];
                if (de.IsHeightEstimated)
                {
                    nHeight = de.HeightInPixel * conversionFactor;
                    if (nHeight < defaultHeight)
                    {
                        nHeight = defaultHeight;
                    }

                    if (nHeight > robj.Height)
                    {
                        robj.Height = nHeight;
                    }
                }
            }
        }