示例#1
0
        } // end ConsultarDetalle

        /// <summary>
        /// Carga los cubos seleccionables
        /// </summary>
        private void BindCubos()
        {
            //  Si un servidor de Artus esta seleccionado
            if (this.ServidorArtusComboBox.SelectedItem != null)
            {
                //  Obtenemos el servidor artus elegido
                lib.ConexionMetaDataArtus conn =
                    (lib.ConexionMetaDataArtus) this.ServidorArtusComboBox.SelectedItem;

                //  Instanciamos concepto
                lib.artus.SI_CONCEPTO si_concepto = new lib.artus.SI_CONCEPTO();

                //  Asignamos la conexión del servidor artus seleccionado
                this.SqlDB = new SqlServerHelper(
                    conn.Servidor,
                    conn.BaseDatos,
                    conn.Usuario,
                    conn.Password
                    );

                //  Asignamos la conexión a la instancia de concepto
                si_concepto.SqlDB = this.SqlDB;

                //  Obtenemos los conceptos
                this.sI_CONCEPTOBindingSource.DataSource = si_concepto.Read();
            } // end if
        }     // end BindCubos
示例#2
0
        }     // end BindCubos

        /// <summary>
        /// Consulta la información del cubo en la base de datos y la muestra en el reporte
        /// </summary>
        public void Consultar()
        {
            //  Obtenemos el concepto del cubo seleccionado
            lib.artus.SI_CONCEPTO si_concepto = (lib.artus.SI_CONCEPTO) this.CuboComboBox.SelectedItem;

            //  Obtenemos las datasources

            //  Los indicadores
            lib.artus.Vista_Indicadores_Cubo ind = new lib.artus.Vista_Indicadores_Cubo();
            ind.SqlDB = this.SqlDB;
            List <lib.artus.Vista_Indicadores_Cubo> vista_indicadores_cubo = ind.Get(si_concepto.CLA_CONCEPTO);

            //  Las dimension
            lib.artus.Vista_Dimensiones_Cubo dim = new lib.artus.Vista_Dimensiones_Cubo();
            dim.SqlDB = this.SqlDB;
            List <lib.artus.Vista_Dimensiones_Cubo> vista_dimensiones_cubo = dim.Get(si_concepto.CLA_CONCEPTO);

            //  Los periodos
            lib.artus.Vista_Periodos_Cubo per = new lib.artus.Vista_Periodos_Cubo();
            per.SqlDB = this.SqlDB;
            List <lib.artus.Vista_Periodos_Cubo> vista_periodos_cubo = per.Get(si_concepto.CLA_CONCEPTO);

            //  El cubo
            List <lib.artus.SI_CONCEPTO> si_conceptos = new List <lib.artus.SI_CONCEPTO>();

            si_conceptos.Add(si_concepto);

            //  Configuramos el reporte
            this.ReporteCuboReportViewer.LocalReport.ReportEmbeddedResource = "BIHelper.reports.DetalleCuboReport.rdlc";

            //  Eliminamos las fuentes de datos
            this.ReporteCuboReportViewer.LocalReport.DataSources.Clear();

            //  Asignamos las fuentes de datos al reporte

            //  El cubo
            this.ReporteCuboReportViewer.LocalReport.DataSources.Add(
                new Microsoft.Reporting.WinForms.ReportDataSource(
                    "SI_CONCEPTO_DataSet",
                    si_conceptos
                    )
                );

            //  Los indicadores
            this.ReporteCuboReportViewer.LocalReport.DataSources.Add(
                new Microsoft.Reporting.WinForms.ReportDataSource(
                    "Vista_Indicadores_DataSet",
                    vista_indicadores_cubo
                    )
                );

            //  Las dimesiones
            this.ReporteCuboReportViewer.LocalReport.DataSources.Add(
                new Microsoft.Reporting.WinForms.ReportDataSource(
                    "Vista_Dimensiones_DataSet",
                    vista_dimensiones_cubo
                    )
                );

            //  Los periodos
            this.ReporteCuboReportViewer.LocalReport.DataSources.Add(
                new Microsoft.Reporting.WinForms.ReportDataSource(
                    "Vista_Periodos_DataSet",
                    vista_periodos_cubo
                    )
                );

            //  Actualizamos el reporte
            this.ReporteCuboReportViewer.RefreshReport();
        }