57 lines
1.4 KiB
C#
57 lines
1.4 KiB
C#
using System;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
using DevExpress.XtraReports.UI;
|
|
using System.Data;
|
|
|
|
namespace SkmRheydt
|
|
{
|
|
public partial class Sollstellungen : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<QueryRO>
|
|
{
|
|
public Sollstellungen()
|
|
{
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
public void SetReportDataSource(QueryRO pRO)
|
|
{
|
|
InitTable(pRO);
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
private void InitTable(QueryRO ro)
|
|
{
|
|
decimal gesamt = 0;
|
|
|
|
DateTime monat = DateTime.MinValue;
|
|
|
|
int index = 1;
|
|
|
|
foreach (BeWo.Report.ReportObjects.QueryRO.Row row in ro.Rows)
|
|
{
|
|
if (monat == DateTime.MinValue)
|
|
{
|
|
monat = DateTime.Parse(row.Field8.ToString());
|
|
|
|
}
|
|
String monatStr = String.Format("{0:MM}/{0:yyyy}", monat);
|
|
//row.Field1 = monatStr;
|
|
row.Field1 = "";
|
|
row.Field2 = monatStr;
|
|
|
|
if (row.Field5 != null)
|
|
{
|
|
row.Field5 = row.Field5.ToString().Replace("XXXXXX", monatStr);
|
|
}
|
|
|
|
row.Field7 = String.Format("{0}", index++);
|
|
}
|
|
|
|
lblHeader.Text = String.Format("Liste der Sollstellungen {0:MMMM yyyy}", monat);
|
|
|
|
}
|
|
|
|
}
|
|
}
|