Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["USER_ID"] != null)
            {
                if (Session["ID_ASG"] != null)
                {
                    if (Session["ID_EVENTO"] != null)
                    {
                        if (Session["NOMBRE_CURSO"] != null)
                        {
                            if (Session["NOMBRE_EVENTO"] != null)
                            {
                            }
                        }
                    }
                }
            }
            else
            {
                Response.Redirect("Login.aspx");
            }

            ReporteAsistencia cryRpt = new ReporteAsistencia();

            cryRpt.Load(Server.MapPath("ReporteAsistencia.rpt"));
            cryRpt.SetParameterValue("@idAsignacionCatedratico", Convert.ToInt32(Session["ID_ASG"].ToString()));
            cryRpt.SetParameterValue("@idAsignacionEvento", Convert.ToInt32(Session["ID_EVENTO"].ToString()));
            cryRpt.SetParameterValue("@Facultad", "Facultad: Ingeniería en Sistemas, La Antigua Guatemala");
            cryRpt.SetParameterValue("@Catedratico", "Catedrático: " + Session["NOMBRE_CATEDRATICO"].ToString());
            cryRpt.SetParameterValue("@Curso", "Curso: " + Session["NOMBRE_CURSO"].ToString());
            cryRpt.SetParameterValue("@Evento", Session["NOMBRE_EVENTO"].ToString());

            cryRpt.SetDatabaseLogon("joalsam", "ingSoftware1290");
            CrystalReportViewer1.ReportSource = cryRpt;
        }
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReporteAsistencia rpt = new ReporteAsistencia();

            rpt.Site = this.Site;
            return(rpt);
        }