コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            instalPrintReport rpt = new instalPrintReport();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        void install()
        {
            instalPrintReport p = new instalPrintReport();


            cmd = new SqlCommand("select * from ICpay ", con);
            con.Open();
            cmd.ExecuteNonQuery();
            DataSet        ds = new DataSet();
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            da.Fill(ds, "ICpay");
            DataTable dt = ds.Tables["ICpay"];

            p.SetDataSource(ds.Tables["ICpay"]);

            p.SetParameterValue("Name", ins.nametb.Text);
            p.SetParameterValue("phone", ins.phonetb.Text);
            p.SetParameterValue("category", ins.catCB.Text);
            p.SetParameterValue("Date", ins.dateTP.Text);
            p.SetParameterValue("amount", ins.pricetb.Text);
            p.SetParameterValue("floor", ins.floortb.Text);
            p.SetParameterValue("stop", ins.Stopcb.Text);
            p.SetParameterValue("warranty", ins.warrantyTB.Text);
            p.SetParameterValue("deliveryContract", ins.deliveryTB.Text);
            p.SetParameterValue("place", ins.placetb.Text);
            p.SetParameterValue("note", ins.noteCB.Text);
            p.SetParameterValue("machine", ins.machineTB.Text);
            p.SetParameterValue("doorQuality", ins.doorTB.Text);
            p.SetParameterValue("flooring", ins.flooringTB.Text);
            p.SetParameterValue("KOSteel", ins.KOSTB.Text);
            p.SetParameterValue("cabin", ins.cabinTB.Text);
            p.SetParameterValue("discription", ins.discriptionTB.Text);

            crystalReportViewer1.ReportSource = p;
            crystalReportViewer1.Refresh();

            con.Close();
        }