Texte libre

Welcome on Business Intelligence Blog !!!

This blog is dedicated to Business Intelligence technologies under SAS9 and SQL Server 2005.

Calendrier

Juillet 2008
L M M J V S D
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
<< < > >>

Recommander

Cliquez ici pour recommander ce blog

W3C

  • Feed RSS 2.0
  • Feed ATOM 1.0
  • Feed RSS 2.0
Mardi 18 avril 2006

EN: I've justed published a new article on techheadbrothers about ADOMD.net wich describes how to query a cube and display the request result into a DataGridView ...

http://www.techheadbrothers.com/DesktopDefault.aspx?tabindex=1&tabid=7&AId=133&p=1

FR: Je viens de publier sur techheadbrothers unarticle sur ADOMD.net qui décrit comment accèder aux données d'un cube et comment rendre le résultat dans un DataGridView

Rendez vous sur :

http://www.techheadbrothers.com/DesktopDefault.aspx?tabindex=1&tabid=7&AId=133&p=1

par Renaud Harduin publié dans : MS Analysis Services 2005
ajouter un commentaire commentaires (1)    créer un trackback recommander
Dimanche 19 mars 2006

EN : Instead ogf having a flat representation of Dataset, you can get your data as a CellSet wich represent your md data

FR : Plutôt que d'avoir une représentation plate des données avec le Dataset il est plus interessant d'utiliser un CellSet 

public CellSet getCellSet(string p_mdxQuery)
{
    CellSet m_cs;
    AdomdCommand m_cmd = new AdomdCommand(p_mdxQuery, _mdConn);
    m_cs = m_cmd.ExecuteCellSet();

    return m_cs;
}

EN : Used with a DataGridView, you can get that kind of presentation

FR : Utilisé avec le DataGridView, vous pourrez obtenir ce type de réprésentation

par Renaud Harduin publié dans : MS Analysis Services 2005
ajouter un commentaire commentaires (0)    créer un trackback recommander
Vendredi 17 mars 2006

EN : Still in my  ADOMD.net thread, this sampple shows how to get multidmensional data as a data set, using AdomdCommand, AdomdConnection and AdomdAdapter acting as regular ADO.net component

FR : Toujours dans mon fil ADOMD.net, cet example vous montre comment récupérer des données dans un cube en utiliant les objets  AdomdCommand, AdomdConnection  et AdomdAdapter (comme en ADO.net classique).

public DataSet getDataset(string p_mdxQuery)
{
    DataSet m_ds = new DataSet();

    AdomdCommand m_cmd = new AdomdCommand(p_mdxQuery, _mdConn);
    AdomdDataAdapter m_adpt = new AdomdDataAdapter(m_cmd);
    int nbOfRows = m_adpt.Fill(m_ds);
    return m_ds;
}

EN : ... but once the dataset plugged into a DatagridView the result is a little flat :(

FR : ... ceci dit une fois le dataset cablé dans un DataGridView, le résultat est un peu plat :(

par Renaud Harduin publié dans : MS Analysis Services 2005
ajouter un commentaire commentaires (0)    créer un trackback recommander
Vendredi 10 mars 2006

FR : l'idée est de charger une liste de dimension dans un treeview. La première méthode construit un dictionnaire de dimension pour un cube donné

EN : My Idea is to load a treenode by dimension, hierarchies ... This first method constructs a dicitionnary of dimensions for a given cube :

public Dictionary<string, string> getDimension(string p_cubeName)
{
    Dictionary<string, string> m_dict = new Dictionary<string, string>();
    CubeDef m_cube = this._mdConn.Cubes[p_cubeName];
    foreach (Dimension dim in m_cube.Dimensions)
    {
        m_dict.Add(dim.UniqueName, dim.Caption);
    }
    return m_dict;
}

FR : ici je préfère créer une méthode séparée que j'appelle pour charger les node de sorte à ne pas mélanger accès aux données et chargement du treeview (mon idée étant d'appeler ces méthodes par remoting ou autre). Je présente ici la méthode GetDimensionTree.

EN : I prefer to create a separate method that I call to load treenodeCollection in order to mix data access and treeview loading. (this will be interesting If I decide to use remoting for example ;) or ay distributed model). Here is the node population method :

public TreeNode GetDimensionTree(string p_cubeName)
{
    TreeNode m_nodes = new TreeNode("Dimension");
    Dictionary<string, string> m_dim = this.getDimension(p_cubeName);


    foreach (string dimName in m_dim.Values)
    {
        TreeNode dim_node = new TreeNode(dimName);

        /* populates hierarchies for a given dimension*/
        this.getHierarchyTree(ref dim_node, p_cubeName, dimName);

        /* populates Hierarchy list */
        m_nodes.Nodes.Add(dim_node);
       
    }

    return m_nodes;
}

FR : la méthode getHierarchyTree  sera détaillée dans un autre article.

EN : the getHierarchyTree will be discussed sooner...

 

par Renaud Harduin publié dans : MS Analysis Services 2005
ajouter un commentaire commentaires (0)    créer un trackback recommander
Vendredi 10 mars 2006

FR : Ce sample montre comment obtenir une list de cube pour une connection donnée. Dans ce cas il faut faire attention à ce que l'on récupère car le moteur présente des dimensions au même niveaux que les cubes dans la collection Cubes !

EN : This sample show how to get a Cube list for a given connection. During iteration, you've to consider that cubes are at the same level than dimensions ...

public List<string> getCubeList()
        {
            /* gets the number of cubes */
            int nbOfCubes = _mdConn.Cubes.Count;
            List<string> m_cubeList = new List<string>();
           
           
            /* iterates into the cube list and load a global List */
            for (int i = 0; i < nbOfCubes; i++)
            {
                CubeDef cube = _mdConn.Cubes[i];

                /* We filter because cubes, dimensions ... are exposed at the same level */
                if (cube.Type == CubeType.Cube)
                {
                    m_cubeList.Add(_mdConn.Cubes[i].Name);
                }
            }
            return m_cubeList;
        }

par Renaud Harduin publié dans : MS Analysis Services 2005
ajouter un commentaire commentaires (0)    créer un trackback recommander
Créer un blog sur over-blog.com - Contact - C.G.U. - Rémunération en droits d'auteur avec TF1 Network - Signaler un abus