コード例 #1
0
        public Reporte(DataTable dt)
        {
            InitializeComponent();
            //Crear objeto del reporte(.rpt).
            CrystalReport1 crProducto = new CrystalReport1();

            //Agsignar los datos contenidos en el DataSet que recibe como parámetros.
            crProducto.SetDataSource(dt);

            //Asignar al visor de reportes el contenido del reporte.
            crystalReportViewer1.ReportSource = crProducto;
        }