<?xml version="1.0" encoding="utf-8"?> <Report ScriptLanguage="CSharp" ReportInfo.Created="09/25/2019 13:15:04" ReportInfo.Modified="11/13/2019 10:16:12" ReportInfo.CreatorVersion="2018.4.2.0"> <ScriptText>using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; using System.Drawing; using System.Data; using FastReport; using FastReport.Data; using FastReport.Dialog; using FastReport.Barcode; using FastReport.Table; using FastReport.Utils; namespace FastReport { public class ReportScript { private void Data1_AfterData(object sender, EventArgs e) { if(!(Boolean)Report.GetColumnValue("Labels.IsManualPrint")) { Shape1.Visible=false; } } } } </ScriptText> <Dictionary> <BusinessObjectDataSource Name="Labels" ReferenceName="Labels" DataType="null" Enabled="true"> <Column Name="SerialNumber" DataType="System.String"/> <Column Name="MaterialCode" DataType="System.String"/> <Column Name="MaterialName" DataType="System.String"/> <Column Name="CreateDate" DataType="System.DateTime"/> <Column Name="ShiftCode" DataType="System.String"/> <Column Name="MachineCode" DataType="System.String"/> <Column Name="ModelCode" DataType="System.String"/> <Column Name="IsManualPrint" DataType="System.Boolean" BindableControl="CheckBox"/> </BusinessObjectDataSource> </Dictionary> <ReportPage Name="Page1" PaperWidth="100" PaperHeight="30" LeftMargin="0" TopMargin="0" RightMargin="0" BottomMargin="0" FirstPageSource="256" OtherPagesSource="256"> <DataBand Name="Data1" Width="378" Height="111.7" AfterDataEvent="Data1_AfterData" DataSource="Labels"> <TextObject Name="Text1" Left="24.4" Top="-0.47" Width="183.75" Height="14.5" Text="[Labels.MaterialName]" AutoWidth="true" Font="黑体, 9pt, style=Bold"/> <BarcodeObject Name="Barcode1" Left="24.31" Top="29.02" Width="297.19" Height="64.66" DataColumn="Labels.SerialNumber" Text="NCA0000019092614040001" Barcode="Code128" Barcode.WideBarRatio="2.5" Barcode.AutoEncode="true"/> <TextObject Name="Text2" Left="25.04" Top="13.49" Width="145.7" Height="14.94" Text="[Labels.MaterialCode]" AutoWidth="true" WordWrap="false" Font="黑体, 9pt"/> <TextObject Name="Text3" Left="24.4" Top="92.22" Width="130.5" Height="13.14" Text="[Labels.CreateDate]" Format="Custom" Format.Format="yyyy-MM-dd HH:mm:ss" AutoWidth="true" WordWrap="false" Font="黑体, 10pt"/> <ShapeObject Name="Shape1" Left="236.61" Top="17.82" Width="5.67" Height="5.67" Fill.Color="Black"/> <TextObject Name="Text4" Left="243.72" Top="13.77" Width="81.2" Height="14.94" Text="[Replace([Labels.MachineCode],"INJ_","")]" AutoWidth="true" WordWrap="false" Font="黑体, 9pt"/> <TextObject Name="Text5" Left="329.67" Top="14.21" Width="28.86" Height="14.94" Text="[Labels.ModelCode]" AutoWidth="true" WordWrap="false" Font="黑体, 10pt"/> <TextObject Name="Text6" Left="163.56" Top="91.7" Width="81.2" Height="14.94" Text="[Replace([Labels.ShiftCode],"INJ_","")]" AutoWidth="true" VertAlign="Center" WordWrap="false" Font="黑体, 10pt"/> </DataBand> </ReportPage> </Report>