Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            PriceGroup rpt = new PriceGroup();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        private void PriceGroupReportViewer_Load(object sender, EventArgs e)
        {
            PriceGroup rv = new PriceGroup();
            ReportSet ds = new ReportSet();

            foreach (ReportContainerClass rc in GPData.reportlist)
            {

                if (rc.pricegroup == "")
                {
                    PGroupChecker = "No PriceGroup Items";
                }
                else
                {
                    PGroupChecker = rc.pricegroup;
                }
                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["PRICEGROUP"] = PGroupChecker;
                cRow["QUANTITY"] = valuecontainer;
                cRow["PRICE"] = valuecontainer2;
                ds.ReportViewer.Rows.Add(cRow);

            }
            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();
        }
        private void PriceGroupReportViewer_Load(object sender, EventArgs e)
        {
            PriceGroup rv = new PriceGroup();
            ReportSet  ds = new ReportSet();

            foreach (ReportContainerClass rc in GPData.reportlist)
            {
                if (rc.pricegroup == "")
                {
                    PGroupChecker = "No PriceGroup Items";
                }
                else
                {
                    PGroupChecker = rc.pricegroup;
                }
                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["PRICEGROUP"] = PGroupChecker;
                cRow["QUANTITY"]   = valuecontainer;
                cRow["PRICE"]      = valuecontainer2;
                ds.ReportViewer.Rows.Add(cRow);
            }
            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();
        }
Exemplo n.º 4
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     PriceGroup rpt = new PriceGroup();
     rpt.Site = this.Site;
     return rpt;
 }