CaritasverbandOstvest/Export/DiamantExporter.cs mit Beleg der Buchungen

This commit is contained in:
2024-09-18 16:19:16 +02:00
parent 3b9146c323
commit 099dd08c1f
6 changed files with 797 additions and 42 deletions

View File

@@ -58,6 +58,12 @@
<Compile Include="CustomReportCreator.cs" />
<Compile Include="Export\CustomDataExporter.cs" />
<Compile Include="Export\DiamantExporter.cs" />
<Compile Include="Export\QueryListReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Export\QueryListReport.Designer.cs">
<DependentUpon>QueryListReport.cs</DependentUpon>
</Compile>
<Compile Include="InvoiceCustomerReport.cs">
<SubType>Component</SubType>
</Compile>
@@ -102,6 +108,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Export\QueryListReport.resx">
<DependentUpon>QueryListReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="InvoiceCustomerReport.resx">
<DependentUpon>InvoiceCustomerReport.cs</DependentUpon>
<SubType>Designer</SubType>

View File

@@ -8,16 +8,16 @@ using Utils = BS.Shared.Core.Utils;
namespace CaritasverbandOstvest.Export
{
public class SkmDataExporter : DataExporter
public class CustomDataExporter : DataExporter
{
public override string CreateExportString(string pFileID, string[] pHeaderCaption, string[][] pContent)
{
if (pHeaderCaption != null && pHeaderCaption.Length > 0 && pHeaderCaption[0].Contains("Diamant"))
{
return DiamantExporter.CreateExportString(pHeaderCaption, pContent);
}
return base.CreateExportString(pFileID, pHeaderCaption, pContent);
}
//public override string CreateExportString(string pFileID, string[] pHeaderCaption, string[][] pContent)
//{
// //if (pHeaderCaption != null && pHeaderCaption.Length > 0 && pHeaderCaption[0].Contains("Diamant"))
// //{
// // return DiamantExporter.CreateExportString(pHeaderCaption, pContent);
// //}
// //return base.CreateExportString(pFileID, pHeaderCaption, pContent);
//}
public override QueryDC CreateQuery(QueryDC query)
{

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 BeWo.Service.Plugins;
using BS.Shared.DataContracts;
@@ -40,24 +42,26 @@ namespace CaritasverbandOstvest.Export
}
}
}
var dtRg = ExecuteQuery(GetMonatlicheAbrechnungSql(), dt);
var dtEr = ExecuteQuery(GetMonatlicheErloeseLWLSql(), dt);
query.FileName = String.Format("005F{0:yyyyMM}.er2", dt);
query.QueryResult = GetAbrechnungenString(dt, customerOid);
query.Attachments = GetAbrechnungsBeleg(table);
query.QueryResult = GetAbrechnungenString(dt, dtRg, dtEr);
query.Attachments = GetAbrechnungsBeleg(dt, dtRg, dtEr);
}
return query;
}
public static string CreateExportString(string[] pHeaderCaption, string[][] pContent)
{
if (pHeaderCaption != null && pHeaderCaption.Length > 1 && pHeaderCaption[0].Contains("Diamant"))
{
DateTime dt = DateTime.Now;
DateTime.TryParse(pHeaderCaption[1], out dt);
return GetAbrechnungenString(dt, null);
}
return null;
}
//public static string CreateExportString(string[] pHeaderCaption, string[][] pContent)
//{
// if (pHeaderCaption != null && pHeaderCaption.Length > 1 && pHeaderCaption[0].Contains("Diamant"))
// {
// DateTime dt = DateTime.Now;
// DateTime.TryParse(pHeaderCaption[1], out dt);
// return GetAbrechnungenString(dt, null);
// }
// return null;
//}
public static String GetDebitorenString(DateTime date)
{
@@ -97,32 +101,20 @@ namespace CaritasverbandOstvest.Export
return sb.ToString();
}
public static String GetAbrechnungsBeleg(DateTime date)
{
String sql;
sql = GetMonatlicheAbrechnungSql();
var dt = ExecuteQuery(sql, date);
sql = GetMonatlicheErloeseLWLSql();
var dtLWL = ExecuteQuery(sql, date);
//return sb.ToString();
}
public static String GetAbrechnungenString(DateTime date, long? customerOid)
public static String GetAbrechnungenString(DateTime date, DataTable dtRg, DataTable dtEr)
{
StringBuilder sb = new StringBuilder();
String sql;
sql = GetMonatlicheAbrechnungSql();
var dt = ExecuteQuery(sql, date);
var s = GetMonatlicheAbrechnungString(date, customerOid, dt);
//sql = GetMonatlicheAbrechnungSql();
//var dt = ExecuteQuery(sql, date);
var s = GetMonatlicheAbrechnungString(date, dtRg);
if (!String.IsNullOrWhiteSpace(s))
{
sb.Append(s);
}
sql = GetMonatlicheErloeseLWLSql();
dt = ExecuteQuery(sql, date);
s = GetMonatlicheAbrechnungString(date, customerOid, dt);
//sql = GetMonatlicheErloeseLWLSql();
//dt = ExecuteQuery(sql, date);
s = GetMonatlicheAbrechnungString(date, dtEr);
if (!String.IsNullOrWhiteSpace(s))
{
sb.Append(s);
@@ -133,7 +125,7 @@ namespace CaritasverbandOstvest.Export
return sb.ToString();
}
public static String GetMonatlicheAbrechnungString(DateTime date, long? customerOid, DataTable dt)
public static String GetMonatlicheAbrechnungString(DateTime date, DataTable dt)
{
// Export enthält Rechnungsangaben Zeilen (Zeile F und hier auch Zeile G) und Kostenstellen/Rechnungspositionsangaben (Zeile K) in drei Zeilen
@@ -210,7 +202,7 @@ namespace CaritasverbandOstvest.Export
String sql = @"
SELECT
CONCAT(qry.Oid, sum(qry.Betrag)) AS OID,
qry.Oid AS OID,
'F',
'0',
'00305',
@@ -388,5 +380,67 @@ ORDER BY ib.invoicenumber
return DAOFactory.AdoDAO.ExecuteQuery(newsql).Tables[0];
}
private static List<FileAttachmentDC> GetAbrechnungsBeleg(DateTime dt, DataTable dtRg, DataTable dtEr)
{
try
{
List<FileAttachmentDC> liste = new List<FileAttachmentDC>();
var pdf = new FileAttachmentDC();
var queryReport = new CaritasverbandOstvest.Export.Bericht();
DataTable table = new DataTable();
string[] spalten = new string[] { "Debitor", "Verwendung", "Empfänger", "Nummer", "Datum", "Betrag"};
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[11];
row[1] = invoice[16];
row[2] = invoice[37];
row[3] = invoice[10];
var datum = DateTime.ParseExact(invoice[7].ToString(), "ddMMyyyy", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal);
row[4] = string.Format("{0:dd.MM.yyyy}", datum);
row[5] = string.Format("{0:0.00}", invoice[15]);
table.Rows.Add(row);
}
for (int i = 0; i < dtEr.Rows.Count; i++)
{
DataRow row = table.NewRow();
DataRow invoice = dtEr.Rows[i];
row[0] = invoice[11];
row[1] = invoice[16];
row[2] = invoice[37];
row[3] = invoice[10];
var datum = DateTime.ParseExact(invoice[7].ToString(), "ddMMyyyy", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal);
row[4] = string.Format("{0:dd.MM.yyyy}", datum);
row[5] = string.Format("{0:0.00}", invoice[15]);
table.Rows.Add(row);
}
var queryReportObject = QueryRO.Create(new Query() { Title = "Export" }, table);
queryReportObject.Name = String.Format("Diamant Export {0:MMMM yyyy}", dt);
queryReport.SetReportDataSource(queryReportObject);
queryReport.CreateDocument();
pdf.FileName = String.Format("DiamantExportÜbersicht {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,544 @@
using BeWo.Report.ReportObjects;
namespace CaritasverbandOstvest.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.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.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();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell13 = 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.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((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.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 = 0.6371441168218881D;
//
// 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.xrTableRowHeader.Name = "xrTableRowHeader";
this.xrTableRowHeader.Weight = 1D;
//
// xrTableCell5
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Text = "Debitor";
this.xrTableCell5.Weight = 0.54612354581793587D;
//
// 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";
//
// xrTableCell1
//
this.xrTableCell1.Multiline = true;
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Text = "Verwendung";
this.xrTableCell1.Weight = 2.0672228123418717D;
//
// xrTableCell2
//
this.xrTableCell2.Multiline = true;
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.Text = "Rechnungsdatum";
this.xrTableCell2.Weight = 0.79759451404754966D;
//
// xrTableCell4
//
this.xrTableCell4.Multiline = true;
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.Text = "Empfänger";
this.xrTableCell4.Weight = 1.2453383725571561D;
//
// xrTableCell6
//
this.xrTableCell6.Multiline = true;
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.Text = "Rechnungsnr.";
this.xrTableCell6.Weight = 0.63812667652014088D;
//
// xrTableCell7
//
this.xrTableCell7.Multiline = true;
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Text = "Betrag";
this.xrTableCell7.Weight = 0.705594078715346D;
//
// 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.82319265258908858D;
//
// 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.TopRight;
this.xrTableCell9.Weight = 0.93052691308977087D;
//
// 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.Text = "xrTableCell10";
this.xrTableCell10.Weight = 0.74448199361065537D;
//
// 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.Text = "xrTableCell12";
this.xrTableCell12.Weight = 1.4528946057620062D;
//
// 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 = 2.4117597181265906D;
//
// 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.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Weight = 1D;
//
// xrTableCell11
//
this.xrTableCell11.Multiline = true;
this.xrTableCell11.Name = "xrTableCell11";
this.xrTableCell11.StylePriority.UseFont = false;
this.xrTableCell11.Weight = 0.6371441168218881D;
//
// xrTableCell14
//
this.xrTableCell14.Multiline = true;
this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.StylePriority.UseFont = false;
this.xrTableCell14.Weight = 2.4117597181265906D;
//
// xrTableCell15
//
this.xrTableCell15.Multiline = true;
this.xrTableCell15.Name = "xrTableCell15";
this.xrTableCell15.StylePriority.UseFont = false;
this.xrTableCell15.Weight = 1.4528946057620062D;
//
// xrTableCell16
//
this.xrTableCell16.Multiline = true;
this.xrTableCell16.Name = "xrTableCell16";
this.xrTableCell16.StylePriority.UseFont = false;
this.xrTableCell16.Weight = 0.74448199361065537D;
//
// xrTableCell17
//
this.xrTableCell17.Multiline = true;
this.xrTableCell17.Name = "xrTableCell17";
this.xrTableCell17.StylePriority.UseFont = false;
this.xrTableCell17.Weight = 0.93052691308977087D;
//
// 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.82319265258908858D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.QueryRO);
//
// 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;
}
}

View File

@@ -0,0 +1,27 @@
using System;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using DevExpress.XtraReports.UI;
using System.Data;
namespace CaritasverbandOstvest.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>