123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- 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_Variable_Height : 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_Variable_Height(
- Form ProgressbarPopup, // 진행바 팝업창
- object ResultData, // 실제로 레포트에 출력할 데이타를 전달받음
- ArrayList ColumnHeader, // 컬럼 텍스트명 및 길이 추출정보필드 (참고: _Report_Column_Info 타입의 클래스의 리스트 정보)
- string Title,
- string Summary,
- float ColumnHeight,
- int FontSize)
- {
-
-
-
-
- InitializeComponent();
-
-
-
- this.DataInitialize += new System.EventHandler(this.ActiveReport_Variable_DataInitialize);
- this.FetchData += new FetchEventHandler(ActiveReport_Variable_FetchData);
-
-
-
-
- ResultData_Info = ResultData;
-
-
-
-
-
- this.label_Header_Title.Text = Title;
-
-
- this.textBox_Header_Summary.Text = Summary;
-
- ColumnHeader_Info = ColumnHeader;
-
- _ActiveReport.Create_Column(this, this.pageHeader, this.detail, ColumnHeader_Info, ColumnHeight, FontSize);
-
- Popup_ReportCreate_Progress = ProgressbarPopup;
- }
-
-
-
-
-
-
-
-
-
-
- private void ActiveReport_Variable_DataInitialize(object sender, System.EventArgs eArgs)
- {
- ;
- }
-
-
-
-
-
-
-
-
-
-
- private void ActiveReport_Variable_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 = ((_Report_Column_Info)ColumnHeader_Info[i]).Column_Key;
-
- if (_ActiveReport.Exception_ReportPrint(this, Key, RowCounter, ((DataRow)((DataRowCollection)ResultData_Info)[RowCounter])) == false)
- this.Fields[Key].Value = ((DataRow)((DataRowCollection)ResultData_Info)[RowCounter])[Key].ToString();
- }
-
- _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 = ((_Report_Column_Info)ColumnHeader_Info[i]).Column_Key;
-
- 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;
- }
- }
- }
-
- }
- }
|