internal RdContentNode(RdDocument document) : base(document) { RdMergeCellsStyle tmpStyle = new RdMergeCellsStyle(); Utils.CopyStyleRec(ref tmpStyle, document.DefaultStyle); this.m_style = tmpStyle; }
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>(); }
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; }
internal void Refresh() { this._rep = base.Builder.Template; this.Clear(); this.GetDatasetsFromTemplate(); this.RefreshRelations(); this.RefreshRootdataset(); this.RefreshRowDataset(); }
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; }
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>(); }
internal RdSetNode(RdDocument document) { bool flag = document == null; if (flag) { throw new Exception("报表样式无法解析!"); } this.m_document = document; }
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()); }
internal RdNode(RdDocument document) { bool flag = document == null; if (flag) { throw new Exception("报表样式无法解析!"); } this.m_document = document; this.m_name = ""; this.m_tag = ""; }
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); } } } } }
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()); }
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); }
internal RdRows(RdDocument document) { this.m_document = document; this.m_list = new Dictionary <int, RdRow>(); }
public RdVariable(RdDocument document) : base(document) { }
public RdImages(RdDocument document) { this.m_document = document; this.m_list = new Dictionary <string, RdImage>(); }
public RdImage(RdDocument document) : base(document) { }
public RdRegion(RdDocument document) : base(document) { this.m_boundary = new Rectangle(1, 1, 1, 1); }
public RdAlias(RdDocument document) : base(document) { }
internal RdDataSets(RdDocument document) : base(document) { this.m_list = new Dictionary <string, RdDataSet>(); }
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); }
internal RdColumns(RdDocument document) { this.m_document = document; this.m_list = new Dictionary <int, RdColumn>(); }
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); }
internal RdImage GenChartImage(RdDocument doc, RdCell computeCell, ArrayList paramList) { return(null); }
public RdAliasList(RdDocument document) { this.m_document = document; this.m_list = new Dictionary <string, RdAlias>(); }
public RdCells(RdDocument document) { this.m_document = document; this.m_list = new Dictionary <int, RdStyle>(); }
public RdStyle(RdDocument document) : base(document) { this.m_list = new Dictionary <int, RdCell>(); }