private void Page_Load(object sender, System.EventArgs e) { string sql; string pers_ncorr; string peri_ccod; string Cerrar; string Indefinido; string fini; string ffin; string ffin1; string Porcentaje; string MontoMC; pers_ncorr = Request.QueryString["pers_ncorr"]; //"13207"; peri_ccod = Request.QueryString["peri_ccod"]; //"164"; Cerrar = Request.QueryString["Cerrar"]; //"false"; fini = Request.QueryString["fechai"]; //"15/03/2005"; ffin = Request.QueryString["fechaf"]; //"31/12/2005"; ffin1 = Request.QueryString["fechaf1"]; //"31/12/2005"; Indefinido = Request.QueryString["Indefinido"]; //"31/12/2005"; Porcentaje = Request.QueryString["Porcentaje"]; MontoMC = Request.QueryString["MontoMC"]; oleDbDataAdapter1.SelectCommand.CommandTimeout = 450; //pers_ncorr = "23747"; peri_ccod = "164"; //post_ncorr = "11865"; //string[] informe = new string[4] {"ORIGINAL","DUPLICADO","TRIPLICADO","CUADRIPLICADO"}; string[] informe = new string[2] { "ORIGINAL", "DUPLICADO" }; //CrystalReportContrato reporte = new CrystalReportContrato(); for (int i = 0; i < 1; i++) { sql = EscribirCodigo(pers_ncorr, "0", peri_ccod, i, informe[i], Cerrar, fini, ffin, ffin1, Porcentaje, MontoMC); //Response.Write(sql+"<br>"); //Response.Write(oleDbDataAdapter1.SelectCommand.Connection.State+"<br>"); //Response.Write(oleDbDataAdapter1.SelectCommand.CommandText+"<br>"); //Response.End(); oleDbDataAdapter1.SelectCommand.CommandText = sql; oleDbDataAdapter1.Fill(contrato_Docente141); //oleDbDataAdapter1.Fill(datosContrato1); //Response.Write(informe[i]+"**<br>"); } //reporte.SetDataSource(datosContrato1); if (Indefinido == "false") { contrato_docente.Cryscontrato_docente reporte = new contrato_docente.Cryscontrato_docente(); reporte.SetDataSource(contrato_Docente141); VerContrato.ReportSource = reporte; ExportarPDF(reporte); } else { contrato_docente.Cryscontrato_docenteindefinido reporte2 = new contrato_docente.Cryscontrato_docenteindefinido(); reporte2.SetDataSource(contrato_Docente141); VerContrato.ReportSource = reporte2; ExportarPDF(reporte2); } }
private void Page_Load(object sender, System.EventArgs e) { string sql; string pers_ncorr; string peri_ccod; string Cerrar; string Indefinido; string fini; string ffin; string ffin1; string Porcentaje; string MontoMC; pers_ncorr = Request.QueryString["pers_ncorr"];//"13207"; peri_ccod = Request.QueryString["peri_ccod"];//"164"; Cerrar=Request.QueryString["Cerrar"];//"false"; fini=Request.QueryString["fechai"];//"15/03/2005"; ffin=Request.QueryString["fechaf"];//"31/12/2005"; ffin1=Request.QueryString["fechaf1"];//"31/12/2005"; Indefinido=Request.QueryString["Indefinido"];//"31/12/2005"; Porcentaje=Request.QueryString["Porcentaje"]; MontoMC=Request.QueryString["MontoMC"]; oleDbDataAdapter1.SelectCommand.CommandTimeout=450; //pers_ncorr = "23747"; peri_ccod = "164"; //post_ncorr = "11865"; //string[] informe = new string[4] {"ORIGINAL","DUPLICADO","TRIPLICADO","CUADRIPLICADO"}; string[] informe = new string[2] {"ORIGINAL","DUPLICADO"}; //CrystalReportContrato reporte = new CrystalReportContrato(); for (int i=0; i<1; i++) { sql = EscribirCodigo(pers_ncorr, "0",peri_ccod,i, informe[i], Cerrar,fini,ffin, ffin1, Porcentaje, MontoMC); //Response.Write(sql+"<br>"); //Response.Write(oleDbDataAdapter1.SelectCommand.Connection.State+"<br>"); //Response.Write(oleDbDataAdapter1.SelectCommand.CommandText+"<br>"); //Response.End(); oleDbDataAdapter1.SelectCommand.CommandText = sql; oleDbDataAdapter1.Fill(contrato_Docente141); //oleDbDataAdapter1.Fill(datosContrato1); //Response.Write(informe[i]+"**<br>"); } //reporte.SetDataSource(datosContrato1); if (Indefinido == "false") { contrato_docente.Cryscontrato_docente reporte = new contrato_docente.Cryscontrato_docente(); reporte.SetDataSource(contrato_Docente141); VerContrato.ReportSource = reporte; ExportarPDF(reporte); } else { contrato_docente.Cryscontrato_docenteindefinido reporte2 = new contrato_docente.Cryscontrato_docenteindefinido(); reporte2.SetDataSource(contrato_Docente141); VerContrato.ReportSource = reporte2; ExportarPDF(reporte2); } }