Beispiel #1
0
        private void btn_lbdesign_Click(object sender, EventArgs e)
        {
            if (dgvm.SelectedRows.Count == 0)
            {
                return;
            }
            if (dgv.SelectedRows.Count == 0)
            {
                return;
            }
            string modename = dgvm.SelectedRows[0].Cells[0].Value.ToString();
            string lbname   = dgv.SelectedRows[0].Cells[0].Value.ToString();

            if (modename == "标准模板")
            {
                MessageBox.Show("标准模板不允许设计!", "系统提示");
                return;
            }
            string          filefullpath = Application.StartupPath + "\\report\\" + modename + "\\" + lbname;
            TfrxReportClass Report       = Report = new TfrxReportClass();

            if (!File.Exists(filefullpath))
            {
                MessageBox.Show("标签文件不存在!", "系统提示");
                return;
            }
            try
            {
                Report.LoadReportFromFile(filefullpath);
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("加载打印模板错误,请联系系统管理员!" + ex.Message, "系统错误");
                return;
            }
            Report.DesignReport();
        }
Beispiel #2
0
 public static void Design(TfrxReportClass report)
 {
     report.PrepareReport(true);
     report.DesignReport();
 }