Wednesday, March 7, 2012

How To use Data Mining HTML Tree Viewer

Hi!

I try to use Data Mining HTML Tree Viewer, but has some problem. In the Connection property, i can't set a new connection to this property.

Help me!!!

The Connection property should be used in the code behind the web page. When the web application already initialized an OleDb connection pointing to an Analysis Services server, that connection can be reuased by the web controls.

An example (assuming a Tree viewer control on the page, named DMDecisionTreeViewer1)

System.Data.OleDb.OleDbConnection cn = new System.Data.OleDb.OleDbConnection();

cn.ConnectionString = "Provider=MSOLAP.3;Data Source=localhost; Initial Catalog=MyCatalog";

DMDecisionTreeViewer1.Connection = cn;

DMDecisionTreeViewer1.Model = "MyModel";

DMDecisionTreeViewer1.Tree = "SomePredictableColumn";

If a connection is not available in the web application (the general case), then the Connection property should be ignored and, instead, the Server and Database properties of the controls should be populated. If, in the code above, the properties are set as below:

DMDecisionTreeViewer1.Server = "localhost";

DMDecisionTreeViewer1.Database= "MyCatalog";

then the result will be the same as using the connection created above (the control will create a connection by itself and use it in populating the tree content)

Hope this helps

No comments:

Post a Comment