void InitDimensions()
        {
            OlapManager objOlapManager = new OlapManager();

            objOlapManager.GetCubes();
            string         selection = DropDownListCubes.SelectedItem.ToString();
            List <CubeDef> lCubeList = objOlapManager.LCubes;

            // scan for selected cube
            for (int i = 0; i < lCubeList.Count; i++)
            {
                string myItem = lCubeList[i].Name;
                if (myItem == selection)
                {
                    objOlapManager.GetDimension(lCubeList[i]);
                    break;
                }
            }

            // clear items to avoid duplicates
            ListBoxDimensions.Items.Clear();
            List <string> lDimensions = objOlapManager.LDim;

            ListBoxDimensions.Rows = lDimensions.Count;
            for (int i = 0; i < lDimensions.Count; i++)
            {
                string myItem = lDimensions[i];
                ListBoxDimensions.Items.Add(myItem);
            }
            // reload component
            ListBoxDimensions.DataBind();

            objOlapManager.CloseConnection();
        }
        private void ExecuteOlapQuery()
        {
            OlapManager objOlapManager = new OlapManager();
            CellSet     objCellSet     = objOlapManager.GetQueryResult(TextBoxQuery.Text);

            AdomdDataAdapter objDataAdaptor = new AdomdDataAdapter(objOlapManager.ObjCommand);
            AdomdDataReader  objDataReader  = objOlapManager.ObjCommand.ExecuteReader(CommandBehavior.CloseConnection);

            DataTable  objTable = new DataTable();
            DataColumn myColumn = new DataColumn();
            DataRow    myRow    = null;

            DataTable     objSchemaTable = objDataReader.GetSchemaTable();
            List <string> lMeta          = new List <string>();

            // init meta values
            for (int i = 0; i < objSchemaTable.Rows.Count; i++)
            {
                lMeta.Add(objSchemaTable.Rows[i][0].ToString());
            }

            // add columns and column captions
            for (int i = 0; i < objDataReader.FieldCount; i++)
            {
                myColumn = new DataColumn(lMeta[i]);
                objTable.Columns.Add(myColumn);
            }

            // output the rows in the DataReader
            while (objDataReader.Read())
            {
                // new row
                myRow = objTable.NewRow();
                // set the row values
                for (int i = 0; i < objDataReader.FieldCount; i++)
                {
                    myRow[i] = objDataReader[i];
                }

                // add row to the table
                objTable.Rows.Add(myRow);
            }
            // close reader
            objDataReader.Close();

            GridViewData.DataSource = objTable;
            GridViewData.DataBind();

            // export TEST
            //ExportDataTableToExcel(objTable);

            objOlapManager.CloseConnection();

            // load the main table data
            this.ObjMainTable = objTable;
            Session.Add("queryData", objMainTable);
        }
        // init all cubes
        private void InitCubes()
        {
            OlapManager objOlapManager = new OlapManager();

            objOlapManager.GetCubes();

            // clear items to avoid duplicates
            DropDownListCubes.Items.Clear();

            List <CubeDef> lCubeList = objOlapManager.LCubes;

            for (int i = 0; i < lCubeList.Count; i++)
            {
                string myItem = lCubeList[i].Name;
                DropDownListCubes.Items.Add(myItem);
            }

            objOlapManager.CloseConnection();
        }
        void InitDimensions()
        {
            OlapManager objOlapManager = new OlapManager();

            objOlapManager.GetCubes();
            string selection = DropDownListCubes.SelectedItem.ToString();
            List<CubeDef> lCubeList = objOlapManager.LCubes;

            // scan for selected cube
            for (int i = 0; i < lCubeList.Count; i++)
            {
                string myItem = lCubeList[i].Name;
                if (myItem == selection)
                {
                    objOlapManager.GetDimension(lCubeList[i]);
                    break;
                }
            }

            // clear items to avoid duplicates
            ListBoxDimensions.Items.Clear();
            List<string> lDimensions = objOlapManager.LDim;
            ListBoxDimensions.Rows = lDimensions.Count;
            for (int i = 0; i < lDimensions.Count; i++)
            {
                string myItem = lDimensions[i];
                ListBoxDimensions.Items.Add(myItem);
            }
            // reload component
            ListBoxDimensions.DataBind();

            objOlapManager.CloseConnection();
        }
        // init all cubes
        private void InitCubes()
        {
            OlapManager objOlapManager = new OlapManager();
            objOlapManager.GetCubes();

            // clear items to avoid duplicates
            DropDownListCubes.Items.Clear();

            List<CubeDef> lCubeList = objOlapManager.LCubes;
            for (int i = 0; i < lCubeList.Count; i++)
            {
                string myItem = lCubeList[i].Name;
                DropDownListCubes.Items.Add(myItem);
            }

            objOlapManager.CloseConnection();
        }
        private void ExecuteOlapQuery()
        {
            OlapManager objOlapManager = new OlapManager();
            CellSet objCellSet = objOlapManager.GetQueryResult(TextBoxQuery.Text);

            AdomdDataAdapter objDataAdaptor = new AdomdDataAdapter(objOlapManager.ObjCommand);
            AdomdDataReader objDataReader = objOlapManager.ObjCommand.ExecuteReader(CommandBehavior.CloseConnection);

            DataTable objTable = new DataTable();
            DataColumn myColumn = new DataColumn();
            DataRow myRow = null;

            DataTable objSchemaTable = objDataReader.GetSchemaTable();
            List<string> lMeta = new List<string>();

            // init meta values
            for (int i = 0; i < objSchemaTable.Rows.Count; i++)
                lMeta.Add(objSchemaTable.Rows[i][0].ToString());

            // add columns and column captions
            for (int i = 0; i < objDataReader.FieldCount; i++)
            {
                myColumn = new DataColumn(lMeta[i]);
                objTable.Columns.Add(myColumn);
            }

            // output the rows in the DataReader
            while (objDataReader.Read())
            {
                // new row
                myRow = objTable.NewRow();
                // set the row values
                for (int i = 0; i < objDataReader.FieldCount; i++)
                    myRow[i] = objDataReader[i];

                // add row to the table
                objTable.Rows.Add(myRow);
            }
            // close reader
            objDataReader.Close();

            GridViewData.DataSource = objTable;
            GridViewData.DataBind();

            // export TEST
            //ExportDataTableToExcel(objTable);

            objOlapManager.CloseConnection();

            // load the main table data
            this.ObjMainTable = objTable;
            Session.Add("queryData", objMainTable);
        }