77 lines
1.9 KiB
C#
77 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using SOH.Kernel;
|
|
using EAS.Services;
|
|
using SOH.BLL;
|
|
using SOH.Entities;
|
|
using SOH.Data;
|
|
using SOH.Common;
|
|
using System.Text.RegularExpressions;
|
|
using FastReport;
|
|
using FastReport.Data;
|
|
using FastReport.Design;
|
|
using EAS;
|
|
using SOH.Entities.DTO;
|
|
using System.Collections;
|
|
|
|
namespace SOH.SaleSettings
|
|
{
|
|
public partial class frmDcjjxmLiebiao : Form
|
|
{
|
|
DataTable dt;
|
|
public bool showview = false;
|
|
public frmDcjjxmLiebiao()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public frmDcjjxmLiebiao(DataTable jxdt)
|
|
{
|
|
dt = jxdt;
|
|
InitializeComponent();
|
|
}
|
|
public FastReport.Report re = new FastReport.Report();
|
|
private void frmDcjjxmLiebiao_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
public void init(DataTable dt)
|
|
{
|
|
this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
|
|
this.WindowState = FormWindowState.Maximized;
|
|
|
|
re.Load(System.Windows.Forms.Application.StartupPath + "\\Report\\daochujjxm.frx");
|
|
|
|
re.RegisterData(dt, "Table");
|
|
re.Preview = previewControl1;
|
|
}
|
|
public void print()
|
|
{
|
|
|
|
if (previewControl1.Report == null)
|
|
{
|
|
MessageBox.Show("请先初始化数据!");
|
|
return;
|
|
}
|
|
if (showview)
|
|
{
|
|
if (!this.Visible)
|
|
{
|
|
this.Show();
|
|
//printpreview.Report.Show();
|
|
}
|
|
return;
|
|
}
|
|
previewControl1.Report.PrintSettings.ShowDialog = false;
|
|
previewControl1.Report.Print();
|
|
}
|
|
}
|
|
}
|