示例#1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            suppliergreanleafsummarytotal rpt = new suppliergreanleafsummarytotal();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (txtSupCode.Text == "")
            {
                errorProvider1.SetError(txtSupCode, "Enter Supplier Code");
            }
            string    sup = txtSupCode.Text;
            string    newSup;
            DataTable dt = myReports.getSupplierSummaryDetails(newSup = sup.PadLeft(5, '0'), FromDate.Text.ToString(), ToDate.Text.ToString());

            dt.TableName = "GreanLeafSummary";
            //dt.Columns.Add(FromDate.Text, typeof(System.Int32));
            //dt.Columns.Add(ToDate.Text, typeof(System.Int32));
            dt.WriteXml("SupplierGreenLeafSummary.xml");
            suppliergreanleafsummarytotal myaclist = new suppliergreanleafsummarytotal();

            myaclist.SetDataSource(dt);
            crystalReportViewer1.ReportSource = myaclist;
            crystalReportViewer1.Show();
            txtSupCode.Focus();
        }