using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevExpress.XtraEditors; using System.Data.SqlClient; using ICSSoft.Frame.APP; using System.Configuration; using ICSSoft.Frame.APP.Helper; using ICSSoft.Frame.APP.Model; using DevExpress.XtraGrid.Columns; using System.Linq; using FastReport; using FastReport.Data; using FastReport.Design; namespace ICSSoft.Frame.APP { public partial class FormPreview : DevExpress.XtraEditors.XtraForm { /// /// 打印模型 /// private List model { get; set; } public FormPreview() { InitializeComponent(); } public FormPreview(List model) { InitializeComponent(); this.model = model; } private void FormPreview_Load(object sender, EventArgs e) { Report report = new Report(); report.RegisterData(model, "DataSource"); report.Load(AppDomain.CurrentDomain.BaseDirectory + "FastReport\\barcodeNew.frx"); report.Prepare(); report.Preview = previewControl1; report.ShowPrepared(); } private void btnCancle_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; this.Close(); } private void btnClose_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; this.Close(); } private void previewControl1_Load(object sender, EventArgs e) { } private void previewControl1_Load_1(object sender, EventArgs e) { } } }