public void PrepareBatch(DxTableBatch batch, DxTableSettings settings) { if (batch.tables.Count > 0) { batch.maxCol = settings.maxCol; batch.maxRow = settings.maxRow; batch.layout = settings.layout; foreach (DxTable table in batch.tables) { //do anything? } } }
public static Table LayoutBatch(DxTableBatch batch) { Table t = new Table(); if (batch.layout == DxLayout.Horizontal) { t = HorizontalTable(batch); } //else if (batch.layout == DxLayout.Vertical) t = VerticalTable(batch); //else if (batch.layout == DxLayout.Upper) return UpperTable(batch); //else if (batch.layout == DxLayout.UpperDiag) return UpperDiagTable(batch); return(t); }
public void ProcessOrder(DxTableOrder order) { if (order.batches.Count > 0) { order.batches.Clear(); } bool hassameworksheet = order.HasSameWorksheet(_dpdata); if (!hassameworksheet) { //Need new DPData _dataproject.selectedsheet = order.worksheet; _dpdata = new DPData(_dataproject, order.filter); } bool hassamefilter = order.HasSameFilter(_dpdata); if (!hassamefilter) { _dpdata.filter = order.filter; } _dt = _dpdata.dt; //Each order will result in a list of batches //List<DxBatchOcharts> batchlist = new List<DxBatchOcharts>(); List <DxTableBatch> batchlist = new List <DxTableBatch>(); foreach (DxTableSettings settings in order.list_settings) { if (settings.outputtype == DxOutputtype.Crosstabs) { DxCrosstabsSettings mysettings = (DxCrosstabsSettings)settings; DxTableBatch batch = new DxTableBatch(mysettings, dt); PrepareBatch(batch, settings); batchlist.Add(batch); } } order.batches.AddRange(batchlist); //The invoice serves as a table of contents for what was actually created order.PrepareInvoice(); }
public static Table HorizontalTable(DxTableBatch batch, string obj) { Table t = new Table(); int numrow = (int)(batch.tables.Count / batch.maxCol) + 1; int counter = 0; for (int i = 0; i < numrow; i++) { TableRow r = new TableRow(); for (int j = 0; j < batch.maxCol; j++) { TableCell c = new TableCell(); bool addcell = true; if (counter < batch.tables.Count) { DxTable thisdxtable = batch.tables[counter]; string output = thisdxtable.output; if (thisdxtable.output == "" | thisdxtable.output == null) //if (String.IsNullOrEmpty(thisdxtable.table)) { string thisdxtable_info = String.Format("emptymsg={0} " , thisdxtable.emptymsg); PlaceTextInCell(c, thisdxtable_info); } else { if (obj == "string") { PlaceStringInCell(thisdxtable.output, c); } counter++; } if (addcell) { r.Cells.Add(c); } } } t.Rows.Add(r); } return(t); }
public static Table HorizontalTable(DxTableBatch batch) { return(HorizontalTable(batch, "string")); }