コード例 #1
0
        public string ListarReporteTemperatura()
        {
            List <temperaturaSerial> lista = reporteCtrl.listarReporteTemperatura("20/07/2016", "00:00", "21/07/2016", "16:55", "6735VG2");
            string data = JsonConvert.SerializeObject(lista, Formatting.Indented);

            return(data);
        }
コード例 #2
0
        public void listarTemperatura()
        {
            List <temperaturaSerial> reporteList = new List <temperaturaSerial>();
            var txtfechaini = Request["txtfechaini"].ToString();
            var txtfechafin = Request["txtfechafin"].ToString();

            reporteList = rptCtrl.listarReporteTemperatura(txtfechaini, cbohorai.SelectedItem.Text, txtfechafin, cbohoraf.SelectedItem.Text, cboplaca.Text);
            Documento   = new ReportDocument();
            Documento.Load(Server.MapPath("~/Reporte/reporteTemperatura.rpt"));

            Documento.SetDataSource(reporteList);
            Documento.SetParameterValue("@fini", txtfechaini.ToString());
            Documento.SetParameterValue("@ffin", txtfechafin.ToString());
            Documento.SetParameterValue("@placa", cboplaca.Text);

            //this.CrystalReportViewer1.ReportSource = Documento;
            //this.CrystalReportViewer1.DataBind();
        }