private void renderExcel() { this.Slot.LogDebug(DebugLevel.Debug_1, "Begin render excel"); var sheetname = !string.IsNullOrEmpty(this.DataObj.SheetName) ? this.DataObj.SheetName : this.DataObj.Nome.PadRight(30, ' ').Substring(0, 30).Trim(); var excel = ExcelUT.EseguiRenderDataTableExcel(this.mTabResultSQL, this.DataObj.Nome, this.DataObj.Titolo, sheetname, null); this.mLastResult.DataLen = excel.DatiMemory.Length; this.mLastResult.DataBlob = excel.DatiMemory; this.Slot.LogDebug(DebugLevel.Debug_1, "End render excel"); }
private void runAccorpaAltreEstrazioni() { if (this.DataObj.TipoFileId != eReport.TipoFile.Excel || string.IsNullOrEmpty(this.DataObj.EstrazioniAccorpateIds)) { return; } this.Slot.LogDebug(DebugLevel.Debug_1, "Begin accorpamento"); var ids = this.DataObj.EstrazioniAccorpateIds.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(id => Convert.ToInt32(id)); var estraz = new List <byte[]>(); estraz.Add(this.LastResult.DataBlob); try { this.Slot.Simulate = true; foreach (var id in ids) { //Esegue altra estrazione var repBiz = this.Slot.BizNewWithLoadByPK <ReportEstrazioneBIZ>(id); repBiz.Run(); //Aggiunge ad elenco estraz.Add(repBiz.LastResult.DataBlob); } } finally { this.Slot.Simulate = false; } if (estraz.Count <= 1) { return; } //Accorpa ed imposta su questo risultato this.LastResult.DataBlob = ExcelUT.EseguiAccorpamento(estraz); this.LastResult.DataLen = this.LastResult.DataBlob.Length; this.Slot.LogDebug(DebugLevel.Debug_1, "End accorpamento"); }