AWOMuensterlandRecklinghausen/Export/DiamantExporter mit Beleg der Buchungen

This commit is contained in:
2024-09-18 16:18:51 +02:00
parent 5c7a803b9a
commit 3b9146c323
5 changed files with 817 additions and 13 deletions

View File

@@ -58,6 +58,12 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Export\QueryListReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Export\QueryListReport.Designer.cs">
<DependentUpon>QueryListReport.cs</DependentUpon>
</Compile>
<Compile Include="SBUmsatzerprobung.cs">
<SubType>Component</SubType>
</Compile>
@@ -195,6 +201,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Export\QueryListReport.resx">
<DependentUpon>QueryListReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SBUmsatzerprobung.resx">
<DependentUpon>SBUmsatzerprobung.cs</DependentUpon>
</EmbeddedResource>

View File

@@ -1,10 +1,12 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.IO;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using BS.Shared.DataContracts;
@@ -33,7 +35,9 @@ namespace AWOMuensterlandRecklinghausen.Export
{
dtStart = new DateTime(1900, 1, 1);
}
query.QueryResult = GetAbrechnungenString(dt, dtStart, dtEnd);
var tableRg = ExecuteQuery(GetMonatlicheAbrechnungenSqlNeu(), dt, dtStart, dtEnd);
query.QueryResult = GetAbrechnungenString(dt, dtStart, dtEnd, tableRg);
query.Attachments = GetAbrechnungsBeleg(dt, tableRg);
return query;
}
@@ -43,15 +47,16 @@ namespace AWOMuensterlandRecklinghausen.Export
{
DateTime dt = DateTime.Now;
DateTime.TryParse(pHeaderCaption[1], out dt);
return GetAbrechnungenString(dt, dt, dt);
var tableRg = ExecuteQuery(GetMonatlicheAbrechnungenSqlNeu(), dt, dt, dt);
return GetAbrechnungenString(dt, dt, dt, tableRg);
}
return null;
}
public static String GetAbrechnungenString(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis)
public static String GetAbrechnungenString(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, DataTable tableRg)
{
StringBuilder sb = new StringBuilder();
var s = GetMonatlicheAbrechnungString(date, rechnungsDatumVon, rechnungsDatumBis);
var s = GetMonatlicheAbrechnungString(date, rechnungsDatumVon, rechnungsDatumBis, tableRg);
if (!String.IsNullOrWhiteSpace(s))
{
sb.Append(s);
@@ -64,15 +69,15 @@ namespace AWOMuensterlandRecklinghausen.Export
return sb.ToString();
}
public static String GetMonatlicheAbrechnungString(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis)
public static String GetMonatlicheAbrechnungString(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, DataTable dt)
{
// Export enthält Rechnungsangaben Zeilen (Zeile F) und Kostenstellen/Rechnungspositionsangaben (Zeile K) in zwei Zeilen
// Kommen aus Export in einer Zeile und werden hier getrennt, falls die Rechnung mehrere Positionen hat
int startIdx = 1;
int stopIdx = 19; // ab da beginnen Angaben zu Kostenstelle -> zweite Zeile oder auch mehr falls mehrere Positionen
int startIdx = 5;
int stopIdx = 23; // ab da beginnen Angaben zu Kostenstelle -> zweite Zeile oder auch mehr falls mehrere Positionen
String sql;
sql = GetMonatlicheAbrechnungenSqlNeu();
var dt = ExecuteQuery(sql, date, rechnungsDatumVon, rechnungsDatumBis);
//sql = GetMonatlicheAbrechnungenSqlNeu();
//var dt = ExecuteQuery(sql, date, rechnungsDatumVon, rechnungsDatumBis);
StringBuilder sb = new StringBuilder();
List<DataRow> mergedRows = new List<DataRow>();
@@ -94,7 +99,7 @@ namespace AWOMuensterlandRecklinghausen.Export
for (int i = startIdx; i < row.ItemArray.Length; i++)
{
var item = row[i];
if (i == 10)
if (i == 14)
{
string belegnr = item.ToString();
if (belegnr.Contains("Storno"))
@@ -108,7 +113,7 @@ namespace AWOMuensterlandRecklinghausen.Export
sb.Append(";");
}
}
else if (i == 15)
else if (i == 19)
{
decimal betrag = ErzeugeBetrag(item);
if (betrag != 0)
@@ -132,7 +137,7 @@ namespace AWOMuensterlandRecklinghausen.Export
sb.Append(item);
sb.AppendLine();
}
else if (i == 28)
else if (i == 32)
{
decimal betrag = ErzeugeBetrag(item);
if (betrag != 0)
@@ -158,7 +163,7 @@ namespace AWOMuensterlandRecklinghausen.Export
{
var item = row[i];
// mach nichts mit den ersten Spalten -> erstelle nur Kostenstellen
if (i == 28)
if (i == 32)
{
decimal betrag = ErzeugeBetrag(item);
if (betrag != 0)
@@ -216,6 +221,10 @@ namespace AWOMuensterlandRecklinghausen.Export
SELECT
CONCAT(cb2sc.Oid, ib.InvoiceNumber, Round(sip.Claim, 0)) AS OID,
CONCAT(p.`LastName`, ', ', p.`FirstName`) as Klient,
DATE_FORMAT(ib.`AccountingPeriodStart`, '%d%m%Y') AS Start,
DATE_FORMAT(ib.`AccountingPeriodEnd`, '%d%m%Y') AS End,
org.Name AS Kostentraeger,
'F',
'0',
'124',
@@ -268,5 +277,55 @@ ORDER BY ib.invoicenumber
return DAOFactory.AdoDAO.ExecuteQuery(newsql).Tables[0];
}
private static List<FileAttachmentDC> GetAbrechnungsBeleg(DateTime dt, DataTable dtRg)
{
try
{
List<FileAttachmentDC> liste = new List<FileAttachmentDC>();
var pdf = new FileAttachmentDC();
var queryReport = new AWOMuensterlandRecklinghausen.Export.Bericht();
DataTable table = new DataTable();
string[] spalten = new string[] { "Klient", "Zeitraum", "Nummer", "ReDatum", "Kostenträger", "Betrag", "Notiz" };
for (int i = 0; i < spalten.Length; i++)
table.Columns.Add(spalten[i], typeof(string));
for (int i = 0; i < dtRg.Rows.Count; i++)
{
DataRow row = table.NewRow();
DataRow invoice = dtRg.Rows[i];
row[0] = invoice[1];
var start = DateTime.ParseExact(invoice[2].ToString(), "ddMMyyyy", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal);
var end = DateTime.ParseExact(invoice[3].ToString(), "ddMMyyyy", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal);
row[1] = string.Format("{0:dd.MM.yyyy} - {1:dd.MM.yyyy}", start, end);
row[2] = invoice[14];
var datum = DateTime.ParseExact(invoice[11].ToString(), "ddMMyyyy", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal);
row[3] = string.Format("{0:dd.MM.yyyy}", datum);
row[4] = invoice[4];
row[5] = string.Format("{0:0.00}", invoice[19]);
table.Rows.Add(row);
}
var queryReportObject = QueryRO.Create(new Query() { Title = "Export" }, table);
queryReportObject.Name = String.Format("Rechnungsausgangbuch {0:MMMM yyyy}", dt);
queryReport.SetReportDataSource(queryReportObject);
queryReport.CreateDocument();
pdf.FileName = String.Format("RA-Buch {0:MM.yyyy}.pdf", dt);
using (var ms = new MemoryStream())
{
queryReport.ExportToPdf(ms);
pdf.BinaryData = ms.ToArray();
}
liste.Add(pdf);
return liste;
}
catch (Exception)
{
// continue - auch wenn gar nichts stimmt
}
return null;
}
}
}

View File

@@ -0,0 +1,588 @@
using BeWo.Report.ReportObjects;
namespace AWOMuensterlandRecklinghausen.Export
{
partial class Bericht
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
this.xrTableDetail = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRowDetail = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrTableHeader = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRowHeader = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell();
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblSumme = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.pageFooterBand1 = new DevExpress.XtraReports.UI.PageFooterBand();
this.xrPageInfo2 = new DevExpress.XtraReports.UI.XRPageInfo();
this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo();
this.Title = new DevExpress.XtraReports.UI.XRControlStyle();
this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle();
this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle();
this.DataField = new DevExpress.XtraReports.UI.XRControlStyle();
this.fieldFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
//
this.Detail.HeightF = 0F;
this.Detail.Name = "Detail";
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// Detail1
//
this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTableDetail});
this.Detail1.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.Detail1.HeightF = 25F;
this.Detail1.Name = "Detail1";
this.Detail1.StylePriority.UseFont = false;
//
// xrTableDetail
//
this.xrTableDetail.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableDetail.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTableDetail.Name = "xrTableDetail";
this.xrTableDetail.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 100F);
this.xrTableDetail.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRowDetail});
this.xrTableDetail.SizeF = new System.Drawing.SizeF(1019F, 25F);
this.xrTableDetail.StylePriority.UseBorders = false;
this.xrTableDetail.StylePriority.UsePadding = false;
//
// xrTableRowDetail
//
this.xrTableRowDetail.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell3,
this.xrTableCell13,
this.xrTableCell12,
this.xrTableCell10,
this.xrTableCell9,
this.xrTableCell8,
this.xrTableCell19});
this.xrTableRowDetail.Name = "xrTableRowDetail";
this.xrTableRowDetail.Weight = 1D;
//
// xrTableCell3
//
this.xrTableCell3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field1")});
this.xrTableCell3.Multiline = true;
this.xrTableCell3.Name = "xrTableCell3";
this.xrTableCell3.StylePriority.UseFont = false;
this.xrTableCell3.Text = "xrTableCell3";
this.xrTableCell3.Weight = 1.3329015595509226D;
//
// xrTableCell13
//
this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field2")});
this.xrTableCell13.Multiline = true;
this.xrTableCell13.Name = "xrTableCell13";
this.xrTableCell13.StylePriority.UseFont = false;
this.xrTableCell13.Text = "xrTableCell13";
this.xrTableCell13.Weight = 1.3721222381235081D;
//
// xrTableCell12
//
this.xrTableCell12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field3")});
this.xrTableCell12.Multiline = true;
this.xrTableCell12.Name = "xrTableCell12";
this.xrTableCell12.StylePriority.UseFont = false;
this.xrTableCell12.StylePriority.UseTextAlignment = false;
this.xrTableCell12.Text = "xrTableCell12";
this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell12.Weight = 0.78112926757578538D;
//
// xrTableCell10
//
this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field4")});
this.xrTableCell10.Multiline = true;
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.StylePriority.UseFont = false;
this.xrTableCell10.StylePriority.UseTextAlignment = false;
this.xrTableCell10.Text = "xrTableCell10";
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell10.Weight = 0.6325202448374454D;
//
// xrTableCell9
//
this.xrTableCell9.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field5")});
this.xrTableCell9.Multiline = true;
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.StylePriority.UseFont = false;
this.xrTableCell9.StylePriority.UseTextAlignment = false;
this.xrTableCell9.Text = "xrTableCell9";
this.xrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell9.Weight = 1.5783006153198185D;
//
// xrTableCell8
//
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field6")});
this.xrTableCell8.Multiline = true;
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.StylePriority.UseFont = false;
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "xrTableCell8";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell8.TextFormatString = "{0} €";
this.xrTableCell8.Weight = 0.78320651456435919D;
//
// xrTableCell19
//
this.xrTableCell19.Multiline = true;
this.xrTableCell19.Name = "xrTableCell19";
this.xrTableCell19.StylePriority.UseFont = false;
this.xrTableCell19.StylePriority.UseTextAlignment = false;
this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell19.Weight = 1.3430122126172495D;
//
// DetailReport
//
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail1,
this.GroupHeader1,
this.ReportFooter});
this.DetailReport.DataMember = "Rows";
this.DetailReport.DataSource = this.bindingSource1;
this.DetailReport.Level = 0;
this.DetailReport.Name = "DetailReport";
//
// GroupHeader1
//
this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTableHeader});
this.GroupHeader1.HeightF = 25F;
this.GroupHeader1.Name = "GroupHeader1";
this.GroupHeader1.RepeatEveryPage = true;
//
// xrTableHeader
//
this.xrTableHeader.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableHeader.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableHeader.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTableHeader.Name = "xrTableHeader";
this.xrTableHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 100F);
this.xrTableHeader.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRowHeader});
this.xrTableHeader.SizeF = new System.Drawing.SizeF(1019F, 25F);
this.xrTableHeader.StylePriority.UseBorders = false;
this.xrTableHeader.StylePriority.UseFont = false;
this.xrTableHeader.StylePriority.UsePadding = false;
//
// xrTableRowHeader
//
this.xrTableRowHeader.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell5,
this.xrTableCell1,
this.xrTableCell4,
this.xrTableCell6,
this.xrTableCell2,
this.xrTableCell7,
this.xrTableCell18});
this.xrTableRowHeader.Name = "xrTableRowHeader";
this.xrTableRowHeader.Weight = 1D;
//
// xrTableCell5
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Text = "Klient/in";
this.xrTableCell5.Weight = 1.1424870514351642D;
//
// xrTableCell1
//
this.xrTableCell1.Multiline = true;
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Text = "Zeitraum";
this.xrTableCell1.Weight = 1.1761047716888708D;
//
// xrTableCell4
//
this.xrTableCell4.Multiline = true;
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.StylePriority.UseTextAlignment = false;
this.xrTableCell4.Text = "Re-Nummer";
this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell4.Weight = 0.66953937851411771D;
//
// xrTableCell6
//
this.xrTableCell6.Multiline = true;
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.StylePriority.UseTextAlignment = false;
this.xrTableCell6.Text = "Re-Datum";
this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell6.Weight = 0.5421598595434447D;
//
// xrTableCell2
//
this.xrTableCell2.Multiline = true;
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.Text = "Kostenträger";
this.xrTableCell2.Weight = 1.3528295487792548D;
//
// xrTableCell7
//
this.xrTableCell7.Multiline = true;
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.StylePriority.UseTextAlignment = false;
this.xrTableCell7.Text = "Betrag";
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell7.Weight = 0.67131984255264876D;
//
// xrTableCell18
//
this.xrTableCell18.Multiline = true;
this.xrTableCell18.Name = "xrTableCell18";
this.xrTableCell18.Text = "Notiz";
this.xrTableCell18.Weight = 1.1511536262018458D;
//
// ReportFooter
//
this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable1});
this.ReportFooter.HeightF = 25F;
this.ReportFooter.Name = "ReportFooter";
//
// xrTable1
//
this.xrTable1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable1.Font = new DevExpress.Drawing.DXFont("arial", 9.75F);
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable1.Name = "xrTable1";
this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 100F);
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1});
this.xrTable1.SizeF = new System.Drawing.SizeF(1019F, 25F);
this.xrTable1.StylePriority.UseBorders = false;
this.xrTable1.StylePriority.UseFont = false;
this.xrTable1.StylePriority.UsePadding = false;
//
// xrTableRow1
//
this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell11,
this.xrTableCell14,
this.xrTableCell15,
this.xrTableCell16,
this.xrTableCell17,
this.lblSumme,
this.xrTableCell20});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Weight = 1D;
//
// xrTableCell11
//
this.xrTableCell11.Multiline = true;
this.xrTableCell11.Name = "xrTableCell11";
this.xrTableCell11.StylePriority.UseFont = false;
this.xrTableCell11.Weight = 1.3329015009775924D;
//
// xrTableCell14
//
this.xrTableCell14.Multiline = true;
this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.StylePriority.UseFont = false;
this.xrTableCell14.Weight = 1.3721221795501779D;
//
// xrTableCell15
//
this.xrTableCell15.Multiline = true;
this.xrTableCell15.Name = "xrTableCell15";
this.xrTableCell15.StylePriority.UseFont = false;
this.xrTableCell15.Weight = 0.78112938472244531D;
//
// xrTableCell16
//
this.xrTableCell16.Multiline = true;
this.xrTableCell16.Name = "xrTableCell16";
this.xrTableCell16.StylePriority.UseFont = false;
this.xrTableCell16.Weight = 0.63251977625080558D;
//
// xrTableCell17
//
this.xrTableCell17.Multiline = true;
this.xrTableCell17.Name = "xrTableCell17";
this.xrTableCell17.StylePriority.UseFont = false;
this.xrTableCell17.Weight = 1.5783010839064582D;
//
// lblSumme
//
this.lblSumme.Multiline = true;
this.lblSumme.Name = "lblSumme";
this.lblSumme.StylePriority.UseFont = false;
this.lblSumme.StylePriority.UseTextAlignment = false;
this.lblSumme.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.lblSumme.TextFormatString = "{0} €";
this.lblSumme.Weight = 0.78320651456435919D;
//
// xrTableCell20
//
this.xrTableCell20.Multiline = true;
this.xrTableCell20.Name = "xrTableCell20";
this.xrTableCell20.StylePriority.UseFont = false;
this.xrTableCell20.StylePriority.UseTextAlignment = false;
this.xrTableCell20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell20.Weight = 1.3430122126172495D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.QueryRO);
//
// ReportHeader
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel1});
this.ReportHeader.HeightF = 35F;
this.ReportHeader.Name = "ReportHeader";
//
// xrLabel1
//
this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Name")});
this.xrLabel1.Font = new DevExpress.Drawing.DXFont("Arial", 14F);
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel1.Multiline = true;
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.SizeF = new System.Drawing.SizeF(1018F, 25F);
this.xrLabel1.StyleName = "Title";
this.xrLabel1.StylePriority.UseFont = false;
this.xrLabel1.Text = "Buchhaltungsexport";
//
// pageFooterBand1
//
this.pageFooterBand1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrPageInfo2,
this.xrPageInfo1});
this.pageFooterBand1.HeightF = 48F;
this.pageFooterBand1.Name = "pageFooterBand1";
//
// xrPageInfo2
//
this.xrPageInfo2.Font = new DevExpress.Drawing.DXFont("Arial", 8F);
this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(924.0834F, 25F);
this.xrPageInfo2.Name = "xrPageInfo2";
this.xrPageInfo2.SizeF = new System.Drawing.SizeF(93.91663F, 23F);
this.xrPageInfo2.StyleName = "PageInfo";
this.xrPageInfo2.StylePriority.UseFont = false;
this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrPageInfo2.TextFormatString = "Seite {0} von {1}";
//
// xrPageInfo1
//
this.xrPageInfo1.Font = new DevExpress.Drawing.DXFont("Arial", 8F);
this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 25F);
this.xrPageInfo1.Name = "xrPageInfo1";
this.xrPageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime;
this.xrPageInfo1.SizeF = new System.Drawing.SizeF(924.0834F, 23F);
this.xrPageInfo1.StyleName = "PageInfo";
this.xrPageInfo1.StylePriority.UseFont = false;
//
// Title
//
this.Title.BackColor = System.Drawing.Color.White;
this.Title.BorderColor = System.Drawing.SystemColors.ControlText;
this.Title.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.Title.BorderWidth = 1F;
this.Title.Font = new DevExpress.Drawing.DXFont("Times New Roman", 24F);
this.Title.ForeColor = System.Drawing.Color.Black;
this.Title.Name = "Title";
//
// FieldCaption
//
this.FieldCaption.BackColor = System.Drawing.Color.White;
this.FieldCaption.BorderColor = System.Drawing.SystemColors.ControlText;
this.FieldCaption.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.FieldCaption.BorderWidth = 1F;
this.FieldCaption.Font = new DevExpress.Drawing.DXFont("Times New Roman", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.FieldCaption.ForeColor = System.Drawing.Color.Black;
this.FieldCaption.Name = "FieldCaption";
//
// PageInfo
//
this.PageInfo.BackColor = System.Drawing.Color.White;
this.PageInfo.BorderColor = System.Drawing.SystemColors.ControlText;
this.PageInfo.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.PageInfo.BorderWidth = 1F;
this.PageInfo.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F);
this.PageInfo.ForeColor = System.Drawing.Color.Black;
this.PageInfo.Name = "PageInfo";
//
// DataField
//
this.DataField.BackColor = System.Drawing.Color.White;
this.DataField.BorderColor = System.Drawing.SystemColors.ControlText;
this.DataField.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.DataField.BorderWidth = 1F;
this.DataField.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F);
this.DataField.ForeColor = System.Drawing.SystemColors.ControlText;
this.DataField.Name = "DataField";
//
// fieldFLS
//
this.fieldFLS.DataMember = "FLSReportGroups";
this.fieldFLS.Expression = "[TotalFLM] / 60";
this.fieldFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldFLS.Name = "fieldFLS";
//
// topMarginBand1
//
this.topMarginBand1.HeightF = 50F;
this.topMarginBand1.Name = "topMarginBand1";
//
// bottomMarginBand1
//
this.bottomMarginBand1.HeightF = 50F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// Bericht
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail,
this.DetailReport,
this.ReportHeader,
this.pageFooterBand1,
this.topMarginBand1,
this.bottomMarginBand1});
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
this.fieldFLS});
this.DataSource = this.bindingSource1;
this.Landscape = true;
this.Margins = new DevExpress.Drawing.DXMargins(75F, 75F, 50F, 50F);
this.PageHeight = 827;
this.PageWidth = 1169;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] {
this.Title,
this.FieldCaption,
this.PageInfo,
this.DataField});
this.Version = "23.2";
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
#endregion
private DevExpress.XtraReports.UI.DetailBand Detail;
private System.Windows.Forms.BindingSource bindingSource1;
private DevExpress.XtraReports.UI.DetailBand Detail1;
private DevExpress.XtraReports.UI.DetailReportBand DetailReport;
private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader;
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
private DevExpress.XtraReports.UI.PageFooterBand pageFooterBand1;
private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo2;
private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo1;
private DevExpress.XtraReports.UI.XRControlStyle Title;
private DevExpress.XtraReports.UI.XRControlStyle FieldCaption;
private DevExpress.XtraReports.UI.XRControlStyle PageInfo;
private DevExpress.XtraReports.UI.XRControlStyle DataField;
private DevExpress.XtraReports.UI.XRTable xrTableHeader;
private DevExpress.XtraReports.UI.XRTableRow xrTableRowHeader;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
private DevExpress.XtraReports.UI.XRTable xrTableDetail;
private DevExpress.XtraReports.UI.XRTableRow xrTableRowDetail;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
private DevExpress.XtraReports.UI.CalculatedField fieldFLS;
private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell6;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.ReportFooterBand ReportFooter;
private DevExpress.XtraReports.UI.XRTable xrTable1;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell11;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell15;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell16;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell17;
private DevExpress.XtraReports.UI.XRTableCell lblSumme;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell19;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell18;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell20;
}
}

View File

@@ -0,0 +1,27 @@
using System;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using DevExpress.XtraReports.UI;
using System.Data;
namespace AWOMuensterlandRecklinghausen.Export
{
public partial class Bericht : DevExpress.XtraReports.UI.XtraReport//, IBeWoReport<QueryRO>
{
public Bericht()
{
InitializeComponent();
}
public void SetReportDataSource(QueryRO pRO)
{
decimal sum = 0;
foreach (var row in pRO.Rows)
{
sum += Convert.ToDecimal(row.Field6.ToString());
}
lblSumme.Text = sum.ToString("c2");
this.bindingSource1.DataSource = pRO;
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>