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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void reporte_estatico_Load(object sender, EventArgs e)
        {
            SqlConnection conexion = new SqlConnection();

            conexion.ConnectionString = "Data Source=1CAE-GUA-PC152\\SQLEXPRESS;Initial Catalog=DBClinica_test; Integrated Security = True";
            conexion.Open();

            SqlCommand cmd = new SqlCommand("spGetEmpleados", conexion);

            cmd.CommandType = CommandType.StoredProcedure;

            rpestatico     Reporte           = new rpestatico();
            dsestandar     dsReporteEstandar = new dsestandar();
            SqlDataAdapter adapter           = new SqlDataAdapter(cmd);

            adapter.Fill(dsReporteEstandar, "Empleados");
            Reporte.SetDataSource(dsReporteEstandar);

            crEstandar.ReportSource = Reporte;
        }