Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            RepairReport rpt = new RepairReport();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void cmbReceipt_SelectedIndexChanged(object sender, EventArgs e)
        {
            RepairReport   rpt   = new RepairReport();
            SqlConnection  mycon = default(SqlConnection);
            SqlCommand     cmd   = new SqlCommand();
            SqlDataAdapter myDA  = new SqlDataAdapter();
            myDataset      myDS  = new myDataset();

            mycon              = new SqlConnection(cs.con1);
            cmd.Connection     = mycon;
            cmd.CommandText    = "SELECT * FROM Repairs WHERE ReceiptNo='" + cmbReceipt.Text + "' ORDER BY RepairDate";
            cmd.CommandType    = CommandType.Text;
            myDA.SelectCommand = cmd;
            myDA.Fill(myDS, "RepairSet");
            rpt.SetDataSource(myDS);

            crystalReportViewer2.ReportSource = rpt;
        }