public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            FormatoPreinscripcion rpt = new FormatoPreinscripcion();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            rprt.Load(Server.MapPath(@"~/Reports/FormatoPreinscripcion.rpt"));
            rprt.FileName = Server.MapPath(@"~/Reports/FormatoPreinscripcion.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("ReporteFormatoPreinscripcion", 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.SetParameterValue("@IDMaestro", Convert.ToInt32(Session["IDUserLoged"]));
            FormatoPreinscripcion.ReportSource = rprt;
            FormatoPreinscripcion.DataBind();
        }