Jul
24
Written by:
Michael Washington
7/24/2011 8:14 AM
ComponentsOne’s OLAP For LightSwitch, is a “pivoting data analyzer” control that plugs into LightSwitch. It has been called the ‘Killer App’ for LightSwitch.

You can download the demo at this link:
http://www.componentone.com/SuperProducts/OLAPLightSwitch/

This provides a .zip file that contains two files. Double-click on the C1.LightSwitch.Olap.vsix file to run it.

This brings up a the installer box. Click Install.

It installs really fast, click the Close button.

If you do look at the log, you will see it simply copies files to the:
C:\Users\...\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\ComponentOne\ComponentOne OLAP for LightSwitch\1.0.20112.1\
directory.
Create The Sample Application

Create a new LightSwitch project.

In the Solution Explorer, double-click on Properties.

In Properties, select Extensions, then check the box next to ComponentOne OLAP for LightSwitch.

In the Solution Explorer, right-click on Data Sources, and select Add Table.

Make a table called Cookie according to the image above.

Make a table called SalesPerson according to the image above.

Make a table called Sales according to the image above.

Click the Relationship button.

Make a relationship to Cookie.

Click the Relationship button again.

Make a relationship to SalesPerson.

In the Solution Explorer, right-click on Screens, and select Add Screen.

Create an Editable Grid Screen with Cookies as the Screen Data.
Also make an Editable Grid Screen for SalesPersons and Sales (the name of the Sales table may have been changed to SalesSet by LightSwitch).

Hit the F5 key to run the application.

Enter Sales people (remember to click the Save button).

Enter Cookies.

Enter Sales.
Close the window to stop the program.
Use the OLAP Control

Add a new Screen.

Select the ComponentOne OLAP Screen template, and SalesSet for Screen Data.

The Screen will be created.
Run the application.

If we select Cookie, Quantity, and SalesPerson, we can see the sales.

We can also show SubTotals.

We can drag a field to the Colum Fields to add it to the analysis

For deeper analysis we can create computed fields.

Using code such as the code above.

We can change various settings.

We can Format fields.

We can also see OLAP charts.

There are many types of charts.

All the normal LightSwitch tools work, so we can filter the data to allow us to select a sales person (and/or a date range).

You can also print reports.
Full Documentation
For full documentation on this product, see:
http://helpcentral.componentone.com/nethelp/c1olaplightswitch/
Download Code
The LightSwitch project is available at http://lightswitchhelpwebsite.com/Downloads.aspx
8 comment(s) so far...
Michael, I'm following your example upto the step of choosing the Cookie, Qantity & SalesPerson fields, followed by selecting the Grid, TotalRows, and SubTotals.
Unfortunately the Olap Grid tab shows no data. It does display "Cookie" "Quantity" "SalesPerson" but no data under those fields, as in your example. Nor does the Olap Chart tab show data.
Any ideas what might be causing this?
Heheh... Guess this is one point about LS and 3rd party controls... it seems more difficult to me to debug / identify the root cause of a problem.
The other three screens - editable Cookies Grid, Editable Sales Persons, & Editable Sales Set Grid look Ok.
I'm giving a LightSwitch presentation at the Dayton user group Wednesday and was hoping to use this example.
Any insights greaty appreciated!
THanks!
Dan
By Dan Moyer on
7/25/2011 3:07 PM
|
@Dan Moyer - You did enter data? You did create the Relations between all the tables? I will post the code for my project tomorrow.
By Michael Washington on
7/25/2011 3:13 PM
|
Michael,
Yep, did all that. Like I said, the screens show the data Ok. AFAIK the relationships look good too. Will try on another computer later tonight.
Also double checked I'm using the same version of the OLAP control as shown in your post.
Much appreciate if you can post a zip file containing the solution.
Thanks! Dan
By Dan Moyer on
7/25/2011 4:07 PM
|
@Dan Moyer - I posted the code.
By Michael Washington on
7/25/2011 7:36 PM
|
Thanks for posting the zip file Michael. I found the problem in my project causing the OLAP control not display data. I mistakenly let the Quantity remain the default type-- String. DOH! (Hey a 1 string looks like a 1 integer on the form :^)
Changed the Quanty's type to Integer--as in your example and which I know better but just overlooked-- and the example works great.
Tomorrow night I'm giving a talk at a local user group and plan to show this demo. And also, in lieu of composing a couple PowerPoint slides explaining the LS structure, I plan to show a couple pages out of your eBook (with due credit to your authoring and pointer to where others can purchase your eBook. :-)
Good stuff you've done this year with the Beta!
I've been quiet since early this year consumed with work on another job but have been keeeping my eye on the LS activity, particularly your blog and this site. With LS now RTM, I'm want to get back to using it.
By Dan Moyer on
7/26/2011 8:14 PM
|
@Dan Moyer - That sounds great. Thanks for reporting back that the code worked. Please direct people to the http://LightSwitchHelpWebsite.com and tell them to join so they can download code.
Most of the E-Book sales are from members of the site and that helps pay for the servers. That helps the site the most.
By Michael Washington on
7/26/2011 8:16 PM
|
What kind of reports are ComponentOne using ?
By Mihai Moisei on
9/29/2011 8:44 AM
|
@Mihai Moisei - I don't know what kind of reports are ComponentOne using. But it is most likely the one they sell.
By Michael Washington on
9/29/2011 8:46 AM
|