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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void PrintAllOrderAdvForm_Load(object sender, EventArgs e)
        {
            SqlConnection                 cn = connection.getConnection();
            PrintAllOrderAdvDataSet       ds = new PrintAllOrderAdvDataSet();
            PrintAllOrderAdvCrystalReport cr = new PrintAllOrderAdvCrystalReport();

            string         query4 = "select * from adv_order";
            SqlDataAdapter da4    = new SqlDataAdapter(query4, cn);

            da4.Fill(ds, "adv_order");

            string         query2 = "select top(1) * from avocat";
            SqlDataAdapter da2    = new SqlDataAdapter(query2, cn);

            da2.Fill(ds, "avocat");

            cr.SetDataSource(ds);
            crystalReportViewer1.ReportSource = cr;
            crystalReportViewer1.Refresh();
        }