Example #1
0
        internal RdContentNode(RdDocument document) : base(document)
        {
            RdMergeCellsStyle tmpStyle = new RdMergeCellsStyle();

            Utils.CopyStyleRec(ref tmpStyle, document.DefaultStyle);
            this.m_style = tmpStyle;
        }
Example #2
0
 public RdColumn(RdDocument document, int columnIndex) : base(document)
 {
     this.Column     = columnIndex;
     this.ColumnType = RdColumnType.ctDetailData;
     this.Width      = base.Document.DefaultColumnWidth;
     this.PageBreak  = false;
     this.m_cells    = new Dictionary <int, RdCell>();
 }
Example #3
0
 public RdDataSet(RdDocument document) : base(document)
 {
     this.m_pageRows      = 0;
     this.m_pageColumns   = 1;
     this.m_singleRecord  = false;
     this.m_outputLines   = 0;
     this.m_forceNewPage  = 0;
     this.m_fillWithBlank = true;
 }
Example #4
0
 internal void Refresh()
 {
     this._rep = base.Builder.Template;
     this.Clear();
     this.GetDatasetsFromTemplate();
     this.RefreshRelations();
     this.RefreshRootdataset();
     this.RefreshRowDataset();
 }
Example #5
0
 public RdRow(RdDocument document, int rowIndex) : base(document)
 {
     this.Row        = rowIndex;
     this.RowType    = RdRowType.rtDetailData;
     this.Height     = base.Document.DefaultRowHeight;
     this.PageBreak  = false;
     this.CalcHeight = -1;
     this.AutoHeight = true;
 }
Example #6
0
 internal RdCell(RdDocument document, int row, int column) : base(document)
 {
     this.m_row        = row;
     this.m_column     = column;
     this.m_value      = "";
     this.m_width      = 1;
     this.m_height     = 1;
     this.m_hiddenBy   = null;
     this.m_affectedBy = new List <string>();
 }
Example #7
0
        internal RdSetNode(RdDocument document)
        {
            bool flag = document == null;

            if (flag)
            {
                throw new Exception("报表样式无法解析!");
            }
            this.m_document = document;
        }
Example #8
0
        public static string CalculateReportFile(string reportStyle, RdDocument.GtReportPubGetValue onUnknownFunctionAndVariable)
        {
            string     result = string.Empty;
            RdDocument doc    = new RdDocument();

            doc.OnGtReportPubGetValue += onUnknownFunctionAndVariable;
            doc.SetReport(reportStyle);
            doc.ShowFormula = false;
            doc.ReCalcDoc();
            return(doc.GetReport());
        }
Example #9
0
        internal RdNode(RdDocument document)
        {
            bool flag = document == null;

            if (flag)
            {
                throw new Exception("报表样式无法解析!");
            }
            this.m_document = document;
            this.m_name     = "";
            this.m_tag      = "";
        }
Example #10
0
        public void Refresh()
        {
            RmGroup group = null;
            RdRow   row   = null;

            this.Clear();
            this._rep = base.Builder.Template;
            for (int i = 1; i <= this._rep.Rows.RowCount; i++)
            {
                row = this._rep.Rows[i];
                bool flag = row.RowType == RdRowType.rtGroupHeader || row.RowType == RdRowType.rtGroupFooter;
                if (flag)
                {
                    group = null;
                    foreach (KeyValuePair <int, RmGroup> obj in this.m_items)
                    {
                        bool flag2 = obj.Value.SameGroup(row.DataSet, row.GroupBy);
                        if (flag2)
                        {
                            group = obj.Value;
                            break;
                        }
                    }
                    bool flag3 = group == null;
                    if (flag3)
                    {
                        group = new RmGroup(this);
                        group.SetGroupBy(row.DataSet, row.GroupBy);
                        this.m_items.Add(this.m_items.Count, group);
                    }
                    bool flag4 = row.RowType == RdRowType.rtGroupHeader;
                    if (flag4)
                    {
                        group.Header.Add(group.Header.Count, row);
                    }
                    else
                    {
                        bool flag5 = row.RowType == RdRowType.rtGroupFooter;
                        if (flag5)
                        {
                            group.Footer.Add(group.Footer.Count, row);
                        }
                    }
                }
            }
        }
Example #11
0
        public static string ReportDifference(string reportXml, string priorReportXml)
        {
            string     result     = string.Empty;
            RdDocument repPrior   = new RdDocument();
            RdDocument repCurrent = new RdDocument();

            repPrior.SetReport(priorReportXml);
            repCurrent.SetReport(reportXml);
            for (int rowIndex = 1; rowIndex <= repCurrent.Rows.RowCount; rowIndex++)
            {
                for (int columnIndex = 1; columnIndex <= repCurrent.Columns.ColumnCount; columnIndex++)
                {
                    RdCell cellPrior   = repPrior.GetCell(rowIndex, columnIndex);
                    RdCell cellCurrent = repCurrent.GetCell(rowIndex, columnIndex);
                    bool   flag        = cellPrior == null || cellPrior.GetAsString() != cellCurrent.GetAsString();
                    if (flag)
                    {
                        cellCurrent.SetColor(Color.Red);
                    }
                }
            }
            return(repCurrent.GetReport());
        }
Example #12
0
        public static string GetReportCellResult(string reportXml, int rowIndex, int columnIndex)
        {
            string     result = string.Empty;
            RdDocument doc    = new RdDocument();

            doc.SetReport(reportXml);
            RdCell cell = doc.GetCell(rowIndex, columnIndex);
            bool   flag = cell != null;

            if (flag)
            {
                bool flag2 = cell.AutoDataType == RdDataType.dtFormula;
                if (flag2)
                {
                    result = cell.GetAsText();
                }
                else
                {
                    result = cell.GetAsString();
                }
            }
            return(result);
        }
Example #13
0
 internal RdRows(RdDocument document)
 {
     this.m_document = document;
     this.m_list     = new Dictionary <int, RdRow>();
 }
Example #14
0
 public RdVariable(RdDocument document) : base(document)
 {
 }
Example #15
0
 public RdImages(RdDocument document)
 {
     this.m_document = document;
     this.m_list     = new Dictionary <string, RdImage>();
 }
Example #16
0
 public RdImage(RdDocument document) : base(document)
 {
 }
Example #17
0
 public RdRegion(RdDocument document) : base(document)
 {
     this.m_boundary = new Rectangle(1, 1, 1, 1);
 }
Example #18
0
 public RdAlias(RdDocument document) : base(document)
 {
 }
Example #19
0
 internal RdDataSets(RdDocument document) : base(document)
 {
     this.m_list = new Dictionary <string, RdDataSet>();
 }
Example #20
0
        internal RdImage NewImage(RdDocument doc, RdCell computeCell, ArrayList paramList)
        {
            RdImage result  = new RdImage(doc);
            RdCell  curCell = (RdCell)computeCell.Data;

            result.Left   = computeCell.Column;
            result.Top    = computeCell.Row;
            result.Right  = computeCell.Column + curCell.Width - 1;
            result.Bottom = computeCell.Row + curCell.Height - 1;
            string imgPath      = string.Empty;
            string imgAlignment = string.Empty;
            bool   flag         = paramList.Count == 1;

            if (flag)
            {
                imgPath = paramList[0].ToString();
            }
            else
            {
                bool flag2 = paramList.Count == 2;
                if (flag2)
                {
                    imgPath      = paramList[0].ToString();
                    imgAlignment = paramList[1].ToString();
                }
            }
            bool    flag3 = string.IsNullOrEmpty(imgPath);
            RdImage result2;

            if (flag3)
            {
                result2 = null;
            }
            else
            {
                Image img = Image.FromFile(imgPath);
                result.Name    = imgPath.Substring(imgPath.LastIndexOf('\\') + 1);
                result.Width   = img.Width;
                result.Height  = img.Height;
                result.Preview = true;
                result.Print   = true;
                byte[] graphic = File.ReadAllBytes(imgPath);
                result.GrdphicStr = Convert.ToBase64String(graphic);
                string a = imgAlignment;
                if (!(a == "L"))
                {
                    if (!(a == "R"))
                    {
                        if (!(a == "C"))
                        {
                            result.HAlignment   = RdHAlignment.haCenter;
                            result.ImageControl = RdImageControl.icStretch;
                        }
                        else
                        {
                            result.HAlignment   = RdHAlignment.haCenter;
                            result.ImageControl = RdImageControl.icAlign;
                        }
                    }
                    else
                    {
                        result.HAlignment   = RdHAlignment.haRight;
                        result.ImageControl = RdImageControl.icAlign;
                    }
                }
                else
                {
                    result.HAlignment   = RdHAlignment.haLeft;
                    result.ImageControl = RdImageControl.icAlign;
                }
                result.VAlignment  = RdVAlignment.vaCenter;
                result.Transparent = false;
                bool flag4 = img.RawFormat.Guid == ImageFormat.Bmp.Guid;
                if (flag4)
                {
                    result.Type = RdImageType.itBitmap;
                }
                else
                {
                    bool flag5 = img.RawFormat.Guid == ImageFormat.Emf.Guid;
                    if (flag5)
                    {
                        result.Type = RdImageType.itEMF;
                    }
                    else
                    {
                        result.Type = RdImageType.itJPEG;
                    }
                }
                curCell.SetHAlignment(RdHAlignment.haRight);
                curCell.SetVAlignment(RdVAlignment.vaTop);
                result2 = result;
            }
            return(result2);
        }
Example #21
0
 internal RdColumns(RdDocument document)
 {
     this.m_document = document;
     this.m_list     = new Dictionary <int, RdColumn>();
 }
Example #22
0
        internal RdImage NewImage(RdDocument doc, RdCell computeCell, ArrayList paramList, byte[] graphicValue)
        {
            RdImage result = new RdImage(doc);

            result.Left   = computeCell.Column;
            result.Top    = computeCell.Row;
            result.Right  = computeCell.Column + computeCell.Width - 1;
            result.Bottom = computeCell.Row + computeCell.Height - 1;
            string imgPath      = string.Empty;
            string imgAlignment = string.Empty;
            bool   flag         = paramList.Count == 1;

            if (flag)
            {
                imgPath = paramList[0].ToString();
            }
            else
            {
                bool flag2 = paramList.Count == 2;
                if (flag2)
                {
                    imgPath      = paramList[0].ToString();
                    imgAlignment = paramList[1].ToString();
                }
            }
            bool    flag3 = string.IsNullOrEmpty(imgPath);
            RdImage result2;

            if (flag3)
            {
                result2 = null;
            }
            else
            {
                result.Name       = imgPath.Substring(imgPath.LastIndexOf('\\') + 1);
                result.Width      = 532;
                result.Height     = 333;
                result.Preview    = true;
                result.Print      = true;
                result.GrdphicStr = Convert.ToBase64String(graphicValue);
                string a = imgAlignment;
                if (!(a == "L"))
                {
                    if (!(a == "R"))
                    {
                        if (!(a == "C"))
                        {
                            result.HAlignment   = RdHAlignment.haCenter;
                            result.ImageControl = RdImageControl.icStretch;
                        }
                        else
                        {
                            result.HAlignment   = RdHAlignment.haCenter;
                            result.ImageControl = RdImageControl.icAlign;
                        }
                    }
                    else
                    {
                        result.HAlignment   = RdHAlignment.haRight;
                        result.ImageControl = RdImageControl.icAlign;
                    }
                }
                else
                {
                    result.HAlignment   = RdHAlignment.haLeft;
                    result.ImageControl = RdImageControl.icAlign;
                }
                result.VAlignment  = RdVAlignment.vaCenter;
                result.Transparent = false;
                result.Type        = RdImageType.itEMF;
                computeCell.SetHAlignment(RdHAlignment.haRight);
                computeCell.SetVAlignment(RdVAlignment.vaTop);
                result2 = result;
            }
            return(result2);
        }
Example #23
0
 internal RdImage GenChartImage(RdDocument doc, RdCell computeCell, ArrayList paramList)
 {
     return(null);
 }
Example #24
0
 public RdAliasList(RdDocument document)
 {
     this.m_document = document;
     this.m_list     = new Dictionary <string, RdAlias>();
 }
Example #25
0
 public RdCells(RdDocument document)
 {
     this.m_document = document;
     this.m_list     = new Dictionary <int, RdStyle>();
 }
Example #26
0
 public RdStyle(RdDocument document) : base(document)
 {
     this.m_list = new Dictionary <int, RdCell>();
 }