private void LeerReporte()
        {
            try
            {
                //Actaulizacion de reporte
                using (var form = new FrmReporte(false, reporte))
                {
                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        Ambiente.Mensaje("Reporte actualziado.");
                    }
                }


                //Inicializa objetos
                stiReport = new StiReport();
                if (reporte.Parametrizado)
                {
                    parametros = reporteController.DeSerializar(reporte.Sql);
                    foreach (var p in parametros)
                    {
                        using (var form = new FrmSolicitudParam(p.Clave))
                        {
                            if (form.ShowDialog() == DialogResult.OK)
                            {
                                p.Valor = form.Valor.Trim();
                            }
                        }
                    }
                }

                sql = reporteController.Serializar(reporte.Sql, parametros);
                ds  = reporteController.GetDataSet(sql);

                //Add data to datastore
                stiReport.LoadEncryptedReportFromString(reporte.Codigo, reporte.SecuenciaCifrado);
                stiReport.RegData("DS", "DS", ds);
                //Fill dictionary
                stiReport.Dictionary.Synchronize();
                ReportDesigner.Report = stiReport;
            }
            catch (Exception ex)
            {
                Ambiente.Mensaje(ex.ToString());
            }
        }
 private void CrearNuevoReporte()
 {
     using (var form = new FrmReporte(true))
     {
         if (form.ShowDialog() == DialogResult.OK)
         {
             reporte   = form.Reporte;
             stiReport = form.StiReport;
             if (reporte == null || stiReport == null)
             {
                 procesado = true;
             }
             else
             {
                 ReportDesigner.Report = stiReport;
             }
         }
     }
 }