Example #1
0
        public void Show()
        {
            if (reportName == "")
            {
                return;
            }

            ReportFormat rss = new ReportFormat();

            if (template != "")
            {
                rss = Services.BaseService.GetOneByKey <ReportFormat>(template);
            }

            WaitDialogForm wait = new WaitDialogForm("", "正在生成报表...");

            try
            {
                fr.DataSource = datasource;
                ReportFormat rf = Services.BaseService.GetOneByKey <ReportFormat>(reportName);
                byte[]       bt = null;
                try {
                    bt = rf.ByteReport;
                }
                catch { }

                if (bt == null && template != "")
                {
                    bt = rss.ByteReport;
                }
                fr.ReportByte = bt;

                wait.Close();
                fr.tx1.TextChanged += new EventHandler(tx1_TextChanged);
                fr.ShowDialog();
            }
            catch { wait.Close(); }
        }
Example #2
0
        private void BtnReport_Click(object sender, EventArgs e)
        {
            FrmReport Report = new FrmReport();

            Report.ShowDialog();
        }