-
Notifications
You must be signed in to change notification settings - Fork 0
/
XtraReport1.cs
25 lines (21 loc) · 970 Bytes
/
XtraReport1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting;
namespace WpfApplication1 {
public partial class XtraReport1 : DevExpress.XtraReports.UI.XtraReport {
public XtraReport1() {
InitializeComponent();
}
private void XtraReport1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
PrintingSystem.EditingFieldChanged += new EventHandler<DevExpress.XtraPrinting.EditingFieldEventArgs>(PrintingSystem_EditingFieldChanged);
}
void PrintingSystem_EditingFieldChanged(object sender, DevExpress.XtraPrinting.EditingFieldEventArgs e) {
if (((TextEditingField)e.EditingField).EditorName == "DateEditor") {
e.EditingField.Brick.Text = string.Format("{0:MMMM dd, yyyy}", System.Convert.ToDateTime(e.EditingField.Brick.Text));
}
}
}
}