123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- using System;
- using System.Drawing;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using DataDynamics.ActiveReports;
- using DataDynamics.ActiveReports.Document;
- using System.Data;
- using System.Windows.Forms;
- using System.IO;
- using DataDynamics.ActiveReports.Design;
- using System.Reflection;
- namespace IControls_FireManager
- {
-
-
-
-
-
- public partial class ActiveReport_OperSet : DataDynamics.ActiveReports.ActiveReport
- {
-
- public int RowCounter = 0;
-
- public object ResultData_Info = null;
-
- public ArrayList ColumnHeader_Info = new ArrayList();
-
- public Form Popup_ReportCreate_Progress = new Form();
- public int Popup_ReportCreate_Progress_Count = 0;
-
- public ActiveReport_OperSet(
- Form ProgressbarPopup,
- object ResultData,
- ArrayList ColumnHeader,
- string Title,
- string Summary,
- float ColumnHeight,
- int FontSize)
- {
-
-
-
-
- InitializeComponent();
-
-
-
- this.DataInitialize += new System.EventHandler(this.ActiveReport_DataInitialize);
- this.FetchData += new FetchEventHandler(ActiveReport_FetchData);
-
-
-
-
- ResultData_Info = ResultData;
-
-
-
-
-
- this.label_Header_Title.Text = Title;
-
-
- this.textBox_Header_Summary.Text = Summary;
-
- ColumnHeader_Info = ColumnHeader;
-
-
-
-
- foreach(string ColumnName in ColumnHeader_Info)
- this.Fields.Add(ColumnName);
-
-
- Popup_ReportCreate_Progress = ProgressbarPopup;
- }
-
-
-
-
-
-
-
-
-
-
-
- private void ActiveReport_DataInitialize(object sender, System.EventArgs eArgs)
- {
- ;
- }
-
-
-
-
-
-
-
-
-
-
- private void ActiveReport_FetchData(object sender, FetchEventArgs eArgs)
- {
-
-
-
- if (ResultData_Info.GetType() == typeof(DataRowCollection))
- {
- if (RowCounter == ((DataRowCollection)ResultData_Info).Count)
- {
-
- eArgs.EOF = true;
- }
- else
- {
-
- for (int i = 0; i < ColumnHeader_Info.Count; i++)
- {
-
- string Key = ColumnHeader_Info[i].ToString();
-
- if (_ActiveReport.Exception_ReportPrint(this, Key, RowCounter, ((DataRow)((DataRowCollection)ResultData_Info)[RowCounter])) == false)
- this.Fields[Key].Value = ((DataRow)((DataRowCollection)ResultData_Info)[RowCounter])[Key];
- }
-
- _Event.ProgressPopupCount_SendMessage(Popup_ReportCreate_Progress, ++Popup_ReportCreate_Progress_Count);
-
- RowCounter++;
-
- eArgs.EOF = false;
- }
- }
-
-
-
- else if (ResultData_Info.GetType() == typeof(ArrayList))
- {
- if (RowCounter == ((ArrayList)ResultData_Info).Count)
- {
-
- eArgs.EOF = true;
- }
- else
- {
-
- for (int i = 0; i < ColumnHeader_Info.Count; i++)
- {
-
- string Key = ColumnHeader_Info[i].ToString();
-
- this.Fields[Key].Value = _Reflection.GetMemberValue_ArrayList_ByClass(((ArrayList)ResultData_Info), RowCounter, Key);
- }
-
- _Event.ProgressPopupCount_SendMessage(Popup_ReportCreate_Progress, ++Popup_ReportCreate_Progress_Count);
-
- RowCounter++;
-
- eArgs.EOF = false;
- }
- }
- }
-
-
- }
- }
|