public Sheet(Report report, string title) { _report = report; _title = title; }
public Sheets(Report report) { _report = report; }
private void RunReport(Report report, bool newTab){ TabPage tp = null; try{ if (newTab){ tp = HookUpNewTab(report); }else{ tp = (TabPage)report.Tag; } tp.Text = tp.Text + "[RUNNING]"; report.Run(true); } catch(Exception ex){ tp.Text = report.ToString() + "[ERROR]"; MessageBox.Show(this, ex.Message, "QED"); } }
public ReportEventArgs(Report report, Row lastestRow) { _report = report; _lastestRow = lastestRow; }
private TabPage HookUpNewTab(Report report){ report.OnAddRow += new Report.AddRowHandler(Report_AddRow); report.OnCompleted += new Report.CompletedHandler(Report_Complete); return this.CreateReportTab(report); }
private void UpdateReportRichTextBox(Report report, string text){ RichTextBox rch = null; TabPage tp = (TabPage)report.Tag; foreach(Control ctrl in tp.Controls){ if (ctrl is RichTextBox){ rch = (RichTextBox)ctrl; } } rch.Text = text; }
private void Report_AddRow(Report report, JCSLA.Reports.ReportEventArgs args){ TabPage tp = (TabPage)report.Tag; UpdateReportRichTextBox(report, args.ReportText); }
private void Report_Complete(Report report, JCSLA.Reports.ReportEventArgs args){ ((TabPage)report.Tag).Text = report.ToString(); UpdateReportRichTextBox(report, args.ReportText); }
public TabPage CreateReportTab(Report report){ TabPage tp; string name = report.ToString(); tp = UI.GetTabByName(this.tabMain, "tab" + name); if (tp == null){ RichTextBox rch = new RichTextBox(); rch.BackColor = System.Drawing.Color.White; rch.ForeColor = System.Drawing.Color.Black; rch.Location = new System.Drawing.Point(8, 16); rch.Name = "rch" + name; rch.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Both; rch.Size = new System.Drawing.Size(960, 600); rch.TabIndex = 0; rch.Text = ""; rch.ReadOnly = true; rch.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); rch.WordWrap = false; rch.LinkClicked += new LinkClickedEventHandler(rch_LinkClick); Button btnPrint = new Button(); btnPrint.Name = "btnPrint" + name; btnPrint.Text = "&Print"; btnPrint.Location = new Point(816, 624); btnPrint.Size = new Size(75, 23); btnPrint.Click += new System.EventHandler(Report_Print); btnPrint.Tag = report; Button btnExcel = new Button(); btnExcel.Name = "btnExcel" + name; btnExcel.Text = "&Excel"; btnExcel.Location = new Point(896, 624); btnExcel.Size = new Size(75, 23); btnExcel.Click += new System.EventHandler(Report_ExportToExcel); btnExcel.Tag = report; tp = new TabPage(name); tp.Location = new System.Drawing.Point(4, 22); tp.Name = "tab" + name; tp.Size = new System.Drawing.Size(984, 670); this.tabMain.TabPages.Add(tp); tp.Controls.AddRange(new Control[]{rch, btnPrint, btnExcel}); tp.Tag = report; report.Tag = tp; } return tp; }