public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { Kardex rpt = new Kardex(); rpt.Site = this.Site; return(rpt); }
protected void Page_Load(object sender, EventArgs e) { rprt.Load(Server.MapPath(@"~/Reports/Kardex.rpt")); rprt.FileName = Server.MapPath(@"~/Reports/Kardex.rpt"); SqlConnection con = new SqlConnection(@"Data Source=sql5037.site4now.net;Initial Catalog=DB_A26FD9_SICOESHunucma;User Id= DB_A26FD9_SICOESHunucma_admin;Password=sicoeshunucma2018;"); SqlCommand cmd = new SqlCommand("Kardex", con); SqlDataAdapter sda = new SqlDataAdapter(cmd); //cmd.Parameters.Add("@IDAlumno", SqlDbType.Int).Value = 33; //cmd.Parameters.Add("@IDDOCS", SqlDbType.Int).Value = 35; ConnectionInfo connectionInfo = new ConnectionInfo(); connectionInfo.ServerName = "sql5037.site4now.net"; connectionInfo.DatabaseName = "DB_A26FD9_SICOESHunucma"; connectionInfo.UserID = "DB_A26FD9_SICOESHunucma_admin"; connectionInfo.Password = "******"; SetDBLogonForReport(connectionInfo, rprt); rprt.SetParameterValue("@IDAlumno", Convert.ToInt32(Session["AlumnoReporteID"]), rprt.Subreports[0].Name.ToString()); rprt.SetParameterValue("@IDAlumno", Convert.ToInt32(Session["AlumnoReporteID"]), rprt.Subreports[1].Name.ToString()); rprt.SetParameterValue("@IDAlumno", Convert.ToInt32(Session["AlumnoReporteID"])); Kardex.ReportSource = rprt; Kardex.DataBind(); }