private void LoadCrystalReport() { ReportView rv = new ReportView(); ReportSet ds = new ReportSet(); foreach (ReportContainerClass rc in GPData.reportlist) { if (rc.soptype == 4) { valuecontainer = (rc.quantity - (rc.quantity * 2)); valuecontainer2 = (rc.price - (rc.price * 2)); } else { valuecontainer = rc.quantity; valuecontainer2 = rc.price; } DataRow cRow = ds.ReportViewer.NewRow(); cRow["SOPNUMBER"] = rc.sopnumber; cRow["ITEMNUMBER"] = rc.itemnumber; cRow["CUSTOMERNAME"] = rc.custname; cRow["QUANTITY"] = valuecontainer; cRow["PRICE"] = valuecontainer2; ds.ReportViewer.Rows.Add(cRow); } ReportContainerClass rc1 = new ReportContainerClass(); rv.DataDefinition.FormulaFields["startDate"].Text = "\"" + Date.date1 + "\""; rv.DataDefinition.FormulaFields["End Date"].Text = "\"" + Date.date2 + "\""; rv.DataDefinition.FormulaFields["Customer"].Text = "\"" + customer + "\""; rv.SetDataSource(ds); crystalReportViewer1.ReportSource = rv; crystalReportViewer1.Refresh(); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ReportView rpt = new ReportView(); rpt.Site = this.Site; return(rpt); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ReportView rpt = new ReportView(); rpt.Site = this.Site; return rpt; }