GrapeCity ActiveAnalysis Part 1: Create an Analysis app from scratch!
ActiveAnalysis Script 1 – Creating an ActiveAnalysis App from scratch
Welcome to my new Multi-part blog series on ActiveAnalysis. In this part, we look creating an application from scratch using GrapeCity’s ActiveAnalysis component. In subsequent parts we will bring data to life looking at the Silverlight viewer, using shapes and trends on charts, Data Window, using more shapes and graphs, Print Preview, Auto Query, Select Summary and Color.
1) Create a new Windows project…
2) From the toolbox, drag RdDataSource to the form designer
3) To get connection string, Select add new data source from the Data menu to simply build the string and copy it…
4) Choose Database
5) Choose Dataset
6) Choose the Northwind connection if you have one, if not create a New Connection to the Northwind database. (to install Northwind DB Click Here)
7) Copy the datasource connection string. Your DataSource string should look something like this:
Data Source=US-MRKT-RUSSELL\MSSQL2008R2;Initial Catalog=Northwind;Integrated Security=True
[![image](/wp-content/uploads/blog_images/russells_blog/image_thumb_650B7BBB.png "image")](/wp-content/uploads/blog_images/russells_blog/image_359D0CEF.png)
8) Cancel this wizard... we only need the connection string.
9) Paste the connection string into the ConnectionString property of rdDataSource1 and Set the connectionType property = Sql
10) We need to set two more properties: Querystring and CustomSchemaFile. Launch the GrapeCity ActiveAnalysis Schema Editor tool.
11) Press the button to automatically generate schema from the specified data source.
12) Select Data Source type as SQL, paste the connection string and enter a select statement for all ORDERS
13) Your screen should look like this after pressing OK.
14) Save the schema to your project directory
15) Note: This can also be done from the command line as well….
GrapeCity.ActiveAnalysis.SchemaGenerator.exe” -c “Data Source=US-MRKT-RUSSELL\MSSQL2008R2;Initial Catalog=Northwind;Integrated Security=True” –q “SELECT * FROM Orders” p sql C:\GrapeCityDemos\BlogsAA\schema.schema
16) Back in Visual Studio, set the CustomSchemaFile property to the schema.schema file we just created.
17) Set the QueryString Property to SELECT * FROM Orders
18) The properties for the rdDataSource should now look something like this…
19) Drag the Pivot View control to the form design surface.
20) Set these properties on the Pivot View
Dock=Fill
DateSource= rdDataSource1
21) Run the app. Note: Strings and dates become attributes and numbers become Measures automatically. Drag (attribute) Shipped Date to Columns
22) Drag (measure) Freight to Label on Encodings to see traditional pivot table numbers.
23) Then drag Freight from Encodings | Label to Columns to bring data to life and see graphs
24) Drag Freight from Columns to Rows for a different graph look.
25) What data sources are supported? SASS and Relational One, ADO.NET, SQL Server, OLEDB, ODBC, anything with iList interface.
26) That’s it! Just define the rdDataSource and plop the PivotViewer control in your application, and you have instant analysis. Pretty simple, huh?
27) How much data is supported? The more attributes in the data the more you take up. Every attribute creates anew fact table that we draw aggregation over on the star schema generated in memory. Incredibly complex queries that return 14 attributes and 30 measures will not get nearly as many rows as if you had 5 attributes and three measures. So, for 2 attributes, 10 to 20 thousand records on relational data is easily doable. If you are using SQL Analysis Services, than the server can process millions of rows and return the consolidated results back and it is doing all the work.
In Part 2 we will look at the Silverlight Viewer and the PivotView control in more depth.
Technorati Tags: ActiveAnalysis,GrapeCity,Analysis,BI,Business Intelligence,getting started,AA,PivotViewer,rdDataSource,Northwind,SASS
tweetmeme_url = 'http://www.clubfarpoint.com/Forums/blogs/russells\_blog/archive/2012/01/28/grapecity-activeanalysis-part-1-create-an-analysis-app-from-scratch.aspx'; tweetmeme_source = '@russcamtv'; tweetmeme_hashtags = '#appdev';