protected void Page_Load(object sender, EventArgs e)
 {
     if (!ValidarConexionYUsuarioLogueado(sender))
     {
         return;
     }
     if (Session["connectionString"] == null || Session["USER"] == null)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "Logoff", "LogOff();", true);
         //Response.Redirect("Login.aspx");
     }
     else
     {
         if (!Page.IsPostBack)
         {
             GetValorizationInventory();
             EstablecerTotalesYGrupoDeSuma();
         }
         try
         {
             if (Session["DSDISEÑO_VALORIZATION_INVENTORY"] != null)
             {
                 var reporte = new Report.ReportValorizationInventory(Session["SYMBOL_CURRENCY"].ToString())
                 {
                     DataSource = Session["DATA_VALORIZATION_INVENTORY"],
                     DataMember = "SWIFT_VALORIZATION_INVENTORY"
                 };
                 ASPxDocumentViewer1.Report = reporte;
                 ASPxDocumentViewer1.DataBind();
             }
             if (Session["DATA_VALORIZATION_INVENTORY"] != null)
             {
                 GetValorizationInventory();
             }
         }
         catch (Exception ex)
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
         }
     }
 }
        public void ReportView()
        {
            try
            {
                if (Session["DATA_VALORIZATION_INVENTORY"] != null)
                {
                    Session["DSDISEÑO_VALORIZATION_INVENTORY"] = "true";

                    var reporte = new Report.ReportValorizationInventory(Session["SYMBOL_CURRENCY"].ToString());
                    reporte.DataSource        = Session["DATA_VALORIZATION_INVENTORY"];
                    reporte.DataMember        = "SWIFT_INVENTORY_VALORIZATION";
                    reporte.RequestParameters = false;

                    reporte.Parameters["symbolCurrency"].Value = Session["SYMBOL_CURRENCY"].ToString();

                    ASPxDocumentViewer1.Report = reporte;
                    ASPxDocumentViewer1.DataBind();
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
            }
        }