添加日报打印
This commit is contained in:
@@ -88,6 +88,9 @@
|
||||
<None Update="ReportMd\CleanMac_IRMsg_PrintMd.frx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="ReportMd\operatorReport.frx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -323,6 +323,8 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
/// </summary>
|
||||
private void Instance_OnReadFinish()
|
||||
{
|
||||
|
||||
Console.WriteLine("数据变化");
|
||||
cbt_RunStatusTran.BackColor = _device.CleanMacRunStatusNew ? Color.Lime : Color.Gray;
|
||||
cbt_Brush1StatusTran.BackColor = _device.Hairbrush1Selection ? Color.Lime : Color.Gray;
|
||||
|
||||
|
||||
@@ -32,6 +32,14 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
this.kryptonPanel2 = new Krypton.Toolkit.KryptonPanel();
|
||||
this.kryptonGroupBox3 = new Krypton.Toolkit.KryptonGroupBox();
|
||||
this.kryptonDataGridView1 = new Krypton.Toolkit.KryptonDataGridView();
|
||||
this.colDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColDayOfWeek = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColStartTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColEndTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColMachineHours = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColCleaned = new Krypton.Toolkit.KryptonDataGridViewNumericUpDownColumn();
|
||||
this.ColScrap = new Krypton.Toolkit.KryptonDataGridViewNumericUpDownColumn();
|
||||
this.colOperators = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.kryptonGroupBox4 = new Krypton.Toolkit.KryptonGroupBox();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.kbt_Reset = new Krypton.Toolkit.KryptonButton();
|
||||
@@ -41,14 +49,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
this.kdtp_CreateStartTime = new Krypton.Toolkit.KryptonDateTimePicker();
|
||||
this.kryptonLabel5 = new Krypton.Toolkit.KryptonLabel();
|
||||
this.kdtp_CreateEndTime = new Krypton.Toolkit.KryptonDateTimePicker();
|
||||
this.colDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColDayOfWeek = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColStartTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColEndTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColMachineHours = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColCleaned = new Krypton.Toolkit.KryptonDataGridViewNumericUpDownColumn();
|
||||
this.ColScrap = new Krypton.Toolkit.KryptonDataGridViewNumericUpDownColumn();
|
||||
this.colOperators = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.kryptonButton1 = new Krypton.Toolkit.KryptonButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).BeginInit();
|
||||
this.kryptonPanel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3)).BeginInit();
|
||||
@@ -118,6 +119,78 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
this.kryptonDataGridView1.Size = new System.Drawing.Size(1020, 500);
|
||||
this.kryptonDataGridView1.TabIndex = 3;
|
||||
//
|
||||
// colDate
|
||||
//
|
||||
this.colDate.DataPropertyName = "Date";
|
||||
this.colDate.HeaderText = "Date";
|
||||
this.colDate.Name = "colDate";
|
||||
this.colDate.ReadOnly = true;
|
||||
this.colDate.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colDate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
this.colDate.Width = 41;
|
||||
//
|
||||
// ColDayOfWeek
|
||||
//
|
||||
this.ColDayOfWeek.DataPropertyName = "DayOfWeek";
|
||||
this.ColDayOfWeek.HeaderText = "DayOfWeek";
|
||||
this.ColDayOfWeek.Name = "ColDayOfWeek";
|
||||
this.ColDayOfWeek.ReadOnly = true;
|
||||
this.ColDayOfWeek.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.ColDayOfWeek.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
this.ColDayOfWeek.Width = 79;
|
||||
//
|
||||
// ColStartTime
|
||||
//
|
||||
this.ColStartTime.DataPropertyName = "StartTime";
|
||||
this.ColStartTime.HeaderText = "StartTime";
|
||||
this.ColStartTime.Name = "ColStartTime";
|
||||
this.ColStartTime.ReadOnly = true;
|
||||
this.ColStartTime.Width = 86;
|
||||
//
|
||||
// ColEndTime
|
||||
//
|
||||
this.ColEndTime.DataPropertyName = "EndTime";
|
||||
this.ColEndTime.HeaderText = "EndTime";
|
||||
this.ColEndTime.Name = "ColEndTime";
|
||||
this.ColEndTime.ReadOnly = true;
|
||||
this.ColEndTime.Width = 82;
|
||||
//
|
||||
// ColMachineHours
|
||||
//
|
||||
this.ColMachineHours.DataPropertyName = "MachineHours";
|
||||
this.ColMachineHours.HeaderText = "MachineHours";
|
||||
this.ColMachineHours.Name = "ColMachineHours";
|
||||
this.ColMachineHours.ReadOnly = true;
|
||||
this.ColMachineHours.Width = 114;
|
||||
//
|
||||
// ColCleaned
|
||||
//
|
||||
this.ColCleaned.AllowDecimals = false;
|
||||
this.ColCleaned.DataPropertyName = "Cleaned";
|
||||
this.ColCleaned.HeaderText = "Cleaned";
|
||||
this.ColCleaned.Name = "ColCleaned";
|
||||
this.ColCleaned.ReadOnly = true;
|
||||
this.ColCleaned.Width = 60;
|
||||
//
|
||||
// ColScrap
|
||||
//
|
||||
this.ColScrap.AllowDecimals = false;
|
||||
this.ColScrap.DataPropertyName = "Scrap";
|
||||
this.ColScrap.HeaderText = "Scrap";
|
||||
this.ColScrap.Name = "ColScrap";
|
||||
this.ColScrap.ReadOnly = true;
|
||||
this.ColScrap.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.ColScrap.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.ColScrap.Width = 65;
|
||||
//
|
||||
// colOperators
|
||||
//
|
||||
this.colOperators.DataPropertyName = "Operator";
|
||||
this.colOperators.HeaderText = "Operator";
|
||||
this.colOperators.Name = "colOperators";
|
||||
this.colOperators.ReadOnly = true;
|
||||
this.colOperators.Width = 83;
|
||||
//
|
||||
// kryptonGroupBox4
|
||||
//
|
||||
this.kryptonGroupBox4.CaptionOverlap = 0D;
|
||||
@@ -142,6 +215,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33444F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33112F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel2.Controls.Add(this.kryptonButton1, 0, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 2, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 1, 0);
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(727, 48);
|
||||
@@ -236,77 +310,18 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
this.kdtp_CreateEndTime.Size = new System.Drawing.Size(246, 21);
|
||||
this.kdtp_CreateEndTime.TabIndex = 7;
|
||||
//
|
||||
// colDate
|
||||
// kryptonButton1
|
||||
//
|
||||
this.colDate.DataPropertyName = "Date";
|
||||
this.colDate.HeaderText = "Date";
|
||||
this.colDate.Name = "colDate";
|
||||
this.colDate.ReadOnly = true;
|
||||
this.colDate.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colDate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
this.colDate.Width = 41;
|
||||
//
|
||||
// ColDayOfWeek
|
||||
//
|
||||
this.ColDayOfWeek.DataPropertyName = "DayOfWeek";
|
||||
this.ColDayOfWeek.HeaderText = "DayOfWeek";
|
||||
this.ColDayOfWeek.Name = "ColDayOfWeek";
|
||||
this.ColDayOfWeek.ReadOnly = true;
|
||||
this.ColDayOfWeek.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.ColDayOfWeek.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
this.ColDayOfWeek.Width = 79;
|
||||
//
|
||||
// ColStartTime
|
||||
//
|
||||
this.ColStartTime.DataPropertyName = "StartTime";
|
||||
this.ColStartTime.HeaderText = "StartTime";
|
||||
this.ColStartTime.Name = "ColStartTime";
|
||||
this.ColStartTime.ReadOnly = true;
|
||||
this.ColStartTime.Width = 86;
|
||||
//
|
||||
// ColEndTime
|
||||
//
|
||||
this.ColEndTime.DataPropertyName = "EndTime";
|
||||
this.ColEndTime.HeaderText = "EndTime";
|
||||
this.ColEndTime.Name = "ColEndTime";
|
||||
this.ColEndTime.ReadOnly = true;
|
||||
this.ColEndTime.Width = 82;
|
||||
//
|
||||
// ColMachineHours
|
||||
//
|
||||
this.ColMachineHours.DataPropertyName = "MachineHours";
|
||||
this.ColMachineHours.HeaderText = "MachineHours";
|
||||
this.ColMachineHours.Name = "ColMachineHours";
|
||||
this.ColMachineHours.ReadOnly = true;
|
||||
this.ColMachineHours.Width = 114;
|
||||
//
|
||||
// ColCleaned
|
||||
//
|
||||
this.ColCleaned.AllowDecimals = false;
|
||||
this.ColCleaned.DataPropertyName = "Cleaned";
|
||||
this.ColCleaned.HeaderText = "Cleaned";
|
||||
this.ColCleaned.Name = "ColCleaned";
|
||||
this.ColCleaned.ReadOnly = true;
|
||||
this.ColCleaned.Width = 60;
|
||||
//
|
||||
// ColScrap
|
||||
//
|
||||
this.ColScrap.AllowDecimals = false;
|
||||
this.ColScrap.DataPropertyName = "Scrap";
|
||||
this.ColScrap.HeaderText = "Scrap";
|
||||
this.ColScrap.Name = "ColScrap";
|
||||
this.ColScrap.ReadOnly = true;
|
||||
this.ColScrap.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.ColScrap.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.ColScrap.Width = 65;
|
||||
//
|
||||
// colOperators
|
||||
//
|
||||
this.colOperators.DataPropertyName = "Operator";
|
||||
this.colOperators.HeaderText = "Operator";
|
||||
this.colOperators.Name = "colOperators";
|
||||
this.colOperators.ReadOnly = true;
|
||||
this.colOperators.Width = 83;
|
||||
this.kryptonButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.kryptonButton1.Location = new System.Drawing.Point(3, 3);
|
||||
this.kryptonButton1.Name = "kryptonButton1";
|
||||
this.kryptonButton1.Size = new System.Drawing.Size(91, 35);
|
||||
this.kryptonButton1.TabIndex = 1;
|
||||
this.kryptonButton1.Tag = "show";
|
||||
this.kryptonButton1.Values.Text = "打印";
|
||||
this.kryptonButton1.Click += new System.EventHandler(this.kryptonButton1_Click);
|
||||
//
|
||||
// frmOperatorReport
|
||||
//
|
||||
@@ -357,5 +372,6 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
private Krypton.Toolkit.KryptonDataGridViewNumericUpDownColumn ColCleaned;
|
||||
private Krypton.Toolkit.KryptonDataGridViewNumericUpDownColumn ColScrap;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colOperators;
|
||||
private Krypton.Toolkit.KryptonButton kryptonButton1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,9 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void frmParamater_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
@@ -94,13 +97,20 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
private void kbt_Reset_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
|
||||
kdtp_CreateStartTime.Checked = false;
|
||||
kdtp_CreateEndTime.Checked = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void kryptonButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
var list = new CleanMachine.BLL.ZBK.DayReportBLL().GetOPReport("");
|
||||
FastReport.Report report = new FastReport.Report();
|
||||
report.Load("ReportMd\\operatorReport.frx");
|
||||
report.RegisterData(list, "datas");
|
||||
//report.Design();
|
||||
report.Prepare();
|
||||
report.Print();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,4 +129,16 @@
|
||||
<metadata name="colOperators.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColStartTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColEndTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColMachineHours.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colOperators.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
51
CleanMachineHMI/ReportMd/operatorReport.frx
Normal file
51
CleanMachineHMI/ReportMd/operatorReport.frx
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="05/17/2022 13:55:09" ReportInfo.Modified="05/17/2022 14:48:54" ReportInfo.CreatorVersion="2014.4.8.0">
|
||||
<Dictionary>
|
||||
<BusinessObjectDataSource Name="datas" ReferenceName="datas" DataType="System.Collections.Generic.List`1[[CleanMachine.Model.ZBK.OperatorReport, CleanMachine.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" Enabled="true">
|
||||
<Column Name="Date" DataType="System.DateTime"/>
|
||||
<Column Name="Operator" DataType="System.String"/>
|
||||
<Column Name="Cleaned" DataType="System.Int32"/>
|
||||
<Column Name="Scrap" DataType="System.Int32"/>
|
||||
<Column Name="DayOfWeek" DataType="System.DayOfWeek"/>
|
||||
<Column Name="StartTime" DataType="System.DateTime"/>
|
||||
<Column Name="EndTime" DataType="System.DateTime"/>
|
||||
<Column Name="MachineHours" DataType="System.Single"/>
|
||||
</BusinessObjectDataSource>
|
||||
</Dictionary>
|
||||
<ReportPage Name="Page1">
|
||||
<ReportTitleBand Name="ReportTitle1" Width="718.2" Height="37.8"/>
|
||||
<PageHeaderBand Name="PageHeader1" Top="39.8" Width="718.2" Height="18.9">
|
||||
<TextObject Name="Text2" Left="37.8" Width="94.5" Height="18.9" Text="Date" VertAlign="Center" Font="宋体, 9pt, style=Bold"/>
|
||||
<TextObject Name="Text4" Left="132.3" Width="94.5" Height="18.9" Text="DayOfWeek" VertAlign="Center" Font="宋体, 9pt, style=Bold"/>
|
||||
<TextObject Name="Text6" Left="226.8" Width="94.5" Height="18.9" Text="Cleaned" VertAlign="Center" Font="宋体, 9pt, style=Bold"/>
|
||||
<TextObject Name="Text8" Left="321.3" Width="47.25" Height="18.9" Text="Scrap" VertAlign="Center" Font="宋体, 9pt, style=Bold"/>
|
||||
<TextObject Name="Text10" Left="368.55" Width="66.15" Height="18.9" Text="StartTime" VertAlign="Center" Font="宋体, 9pt, style=Bold"/>
|
||||
<TextObject Name="Text12" Left="434.7" Width="56.7" Height="18.9" Text="EndTime" VertAlign="Center" Font="宋体, 9pt, style=Bold"/>
|
||||
<TextObject Name="Text14" Left="491.4" Width="94.5" Height="18.9" Text="MachineHours" VertAlign="Center" Font="宋体, 9pt, style=Bold"/>
|
||||
<TextObject Name="Text16" Left="585.9" Width="94.5" Height="18.9" Text="Operator" VertAlign="Center" Font="宋体, 9pt, style=Bold"/>
|
||||
<TextObject Name="Text18" Width="37.8" Height="18.9" Text="NO." VertAlign="Center" Font="宋体, 9pt, style=Bold"/>
|
||||
<LineObject Name="Line1" Top="18.9" Width="680.4" Diagonal="true"/>
|
||||
</PageHeaderBand>
|
||||
<DataBand Name="Data1" Top="60.7" Width="718.2" Height="18.9" CanGrow="true" DataSource="datas" KeepTogether="true">
|
||||
<TextObject Name="Text1" Left="37.8" Width="94.5" Height="18.9" Text="[datas.Date]" Format="Date" Format.Format="d" VertAlign="Center" Font="宋体, 9pt"/>
|
||||
<TextObject Name="Text3" Left="132.3" Width="94.5" Height="18.9" Text="[datas.DayOfWeek]" VertAlign="Center" Font="宋体, 9pt"/>
|
||||
<TextObject Name="Text5" Left="226.8" Width="94.5" Height="18.9" Text="[datas.Cleaned]" VertAlign="Center" Font="宋体, 9pt"/>
|
||||
<TextObject Name="Text7" Left="321.3" Width="47.25" Height="18.9" Text="[datas.Scrap]" VertAlign="Center" Font="宋体, 9pt"/>
|
||||
<TextObject Name="Text9" Left="368.55" Width="66.15" Height="18.9" Text="[datas.StartTime]" Format="Time" Format.Format="t" VertAlign="Center" Font="宋体, 9pt"/>
|
||||
<TextObject Name="Text11" Left="434.7" Width="56.7" Height="18.9" Text="[datas.EndTime]" Format="Time" Format.Format="t" VertAlign="Center" Font="宋体, 9pt"/>
|
||||
<TextObject Name="Text13" Left="491.4" Width="94.5" Height="18.9" Text="[datas.MachineHours]" Format="Number" Format.UseLocale="true" HorzAlign="Right" VertAlign="Center" WordWrap="false" Font="宋体, 9pt" Trimming="EllipsisCharacter"/>
|
||||
<TextObject Name="Text15" Left="585.9" Width="94.5" Height="18.9" Text="[datas.Operator]" VertAlign="Center" Font="宋体, 9pt"/>
|
||||
<TextObject Name="Text17" Width="37.8" Height="18.9" Text="[Row#]" VertAlign="Center" Font="宋体, 9pt"/>
|
||||
<Sort>
|
||||
<Sort Expression="[datas.Date]"/>
|
||||
<Sort Expression="[datas.Operator]"/>
|
||||
</Sort>
|
||||
</DataBand>
|
||||
<PageFooterBand Name="PageFooter1" Top="81.6" Width="718.2" Height="94.5">
|
||||
<TextObject Name="Text19" Left="585.9" Width="94.5" Height="18.9" Text="[PageN]/[TotalPages#]" Font="宋体, 9pt"/>
|
||||
<LineObject Name="Line2" Width="680.4" Diagonal="true"/>
|
||||
<TextObject Name="Text20" Left="226.8" Width="94.5" Height="18.9" Font="宋体, 9pt"/>
|
||||
<TextObject Name="Text21" Left="28.35" Top="18.9" Width="132.3" Height="18.9" Text="sum([datas.scrap])" Font="宋体, 9pt"/>
|
||||
</PageFooterBand>
|
||||
</ReportPage>
|
||||
</Report>
|
||||
Reference in New Issue
Block a user