CEL_Payroll/Ease.UICreator/Report.cs
2024-09-17 14:30:13 +06:00

75 lines
2.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using Ease.Printing;
using Ease.Report;
namespace Ease.UICreator
{
internal class Report
{
private Ease.Report.Designer.ReportDesigner _report;
private MasterForm _master;
public Report(MasterForm master)
{
_report = new Ease.Report.Designer.ReportDesigner();
_report.ReportName = master.Caption;
_report.ReportFormat.PaperSetup(System.Drawing.Printing.PaperKind.A4, EPOrientation.EPOPortrait);
_master = master;
//global.PrepareReportTitle(_report, 19);
//Global.PrepareReportHeader(_report, "Branch & Ship wise Sailor Count", "", 19);
//Global.PrepareReportFooter(_report, 19);
PrepareReport();
}
public Ease.Report.Designer.ReportDesigner ReportDesigner
{
get { return _report; }
}
public void ReportOutput(Ease.Report.Designer.OutputType outputType)
{
_report.ReportOutput(outputType);
}
private void PrepareReport()
{
//_report.CreateTable();
//_report.CurrentTable.Name = _master.Caption;
//_report.CurrentTable.CreateHeaderRow();
//Ease.Report.Designer.Row row = new Ease.Report.Designer.Row();
//foreach (MasterFormlvw UIBEMFitem in _master.Listviewcloumns)
//{
// _report.CurrentTable.CurrentHeaderRow.Columns.AddItem(UIBEMFitem.PropertyName, UIBEMFitem.Caption, 18 / _master.Listviewcloumns.Count , "");
// _report.CurrentTable.CurrentHeaderRow.Columns[UIBEMFitem.PropertyName].ReportTextStyle.Font.Bold = true;
// _report.CurrentTable.CurrentHeaderRow.Columns[UIBEMFitem.PropertyName].ReportTextStyle.Font.Size = 12;
//}
//foreach (MasterFormlvw UIBEMFitem in _master.Listviewcloumns)
//{
// row.Columns.AddItem(UIBEMFitem.PropertyName, UIBEMFitem.Caption, 18 / _master.Listviewcloumns.Count, "");
//}
//CollectionBase list = (CollectionBase)_master.SourceCollection;
//System.Collections.IEnumerator enumerator = list.GetEnumerator();
//while (enumerator.MoveNext())
//{
// _report.CurrentTable.CreateRow(row);
// foreach (MasterFormlvw UIBEMFitem in _master.Listviewcloumns)
// {
// System.Reflection.PropertyInfo dispMem = (enumerator.Current.GetType()).GetProperty(UIBEMFitem.PropertyName);
// string sStr = dispMem.GetValue(enumerator.Current, null).ToString();
// _report.CurrentTable.CurrentRow.Columns[UIBEMFitem.PropertyName].Caption = sStr;
// }
//}
}
}
}