private void CtrlViewReport_Load(object sender, EventArgs e) { sheetTags = new WorksheetTagCollection(reportSheet.Document); sheetTags.SetWorkSheetVisible("Raw Data", false); sheetTags.Clear(); calorieTags = new List <string>(); calorieTags.Add("324"); calorieTags.Add("325"); calorieTags.Add("326"); calorieTags.Add("327"); calorieTags.Add("328"); calorieTags.Add("329"); calorieTags.Add("330"); calorieTags.Add("331"); calorieTags.Add("332"); calorieTags.Add("333"); calorieTags.Add("334"); calorieTags.Add("335"); calorieTags.Add("336"); calorieTags.Add("337"); calorieTags.Add("338"); calorieTags.Add("339"); calorieTags.Add("341"); calorieTags.Add("394"); calorieTags.Add("342"); calorieTags.Add("343"); calorieTags.Add("344"); calorieTags.Add("345"); calorieTags.Add("346"); calorieTags.Add("347"); calorieTags.Add("348"); calorieTags.Add("349"); calorieTags.Add("350"); calorieTags.Add("351"); calorieTags.Add("352"); calorieTags.Add("353"); calorieTags.Add("354"); calorieTags.Add("355"); calorieTags.Add("356"); calorieTags.Add("357"); calorieTags.Add("358"); calorieTags.Add("359"); calorieTags.Add("360"); calorieTags.Add("361"); calorieTags.Add("362"); calorieTags.Add("363"); calorieTags.Add("365"); calorieTags.Add("366"); calorieTags.Add("367"); calorieTags.Add("368"); calorieTags.Add("369"); thermoTags = new List <string>(); for (int i = 0; i < 60; i++) { thermoTags.Add($"{525 + i}"); } }
public void DoClearSpreadSheet(object sender, EventArgs e) { if (this.InvokeRequired == true) { EventHandler func = new EventHandler(DoClearSpreadSheet); this.BeginInvoke(func, new object[] { sender, e }); } else { sheetTags.Clear(); } }
public void Open(Int64 recNo) { sheetTags.Clear(); db.Lock(); try { Dictionary <string, Cell> sheet; DataBookDataSet bookSet = db.DataBookSet; DataSheetDataSet sheetSet = db.DataSheetSet; DataValueUnitDataSet valueUnitSet = db.DataValueUnitSet; DataValueDataSet valueSet = db.DataValueSet; bookSet.Select(recNo); if (bookSet.IsEmpty() == false) { bookSet.Fetch(); if (string.IsNullOrWhiteSpace(bookSet.TestName) == true) { fName = $"None_Line{bookSet.TestLine + 1}"; } else { fName = $"{bookSet.TestName}_Line{bookSet.TestLine + 1}"; } sheetSet.Select(bookSet.RecNo); for (int i = 0; i < sheetSet.GetRowCount(); i++) { sheetSet.Fetch(i); bool isNozzle = false; if ((sheetSet.IDState.EndsWith("Cooling") == true) || (sheetSet.IDState.EndsWith("Heating") == true)) { isNozzle = true; } sheet = sheetTags.Sheets[sheetSet.SheetName]; reportSheet.BeginUpdate(); try { SetSheetTitle(sheet, bookSet, sheetSet); if (sheetSet.Use == true) { valueUnitSet.Select(sheetSet.RecNo); if (i < 4) { SetSheetValues(sheet, calorieTags, bookSet.IntegCount, bookSet.IntegTime, valueUnitSet, valueSet, false, isNozzle); } else { SetSheetValues(sheet, thermoTags, bookSet.IntegCount, bookSet.IntegTime, valueUnitSet, valueSet, true, false); } } } finally { reportSheet.EndUpdate(); } Thread.Sleep(1); } } } finally { db.Unlock(); } }