You are here:   Blog
Register   |  Login

 

Jul 24

Written by: Michael Washington
7/24/2011 8:14 AM  RssIcon

ComponentsOne’s OLAP For LightSwitch, is a “pivoting data analyzer” control that plugs into LightSwitch. It has been called the ‘Killer App’ for LightSwitch.

image

You can download the demo at this link:

http://www.componentone.com/SuperProducts/OLAPLightSwitch/

image

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

image

This brings up a the installer box. Click Install.

image

It installs really fast, click the Close button.

image

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

 

image

Create a new LightSwitch project.

image

In the Solution Explorer, double-click on Properties.

image

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

image

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

image

Make a table called Cookie according to the image above.

image

Make a table called SalesPerson according to the image above.

image

Make a table called Sales according to the image above.

image

Click the Relationship button.

image

Make a relationship to Cookie.

image

Click the Relationship button again.

image

Make a relationship to SalesPerson.

image

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

image

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).

image

Hit the F5 key to run the application.

image

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

image

Enter Cookies.

image

Enter Sales.

Close the window to stop the program.

 

Use the OLAP Control

image

Add a new Screen.

image

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

image

The Screen will be created.

Run the application.

image

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

image

We can also show SubTotals.

image

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

image

For deeper analysis we can create computed fields.

image

Using code such as the code above.

image

We can change various settings.

image

We can Format fields.

image

We can also see OLAP charts.

image

There are many types of charts.

image

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).

image

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...


Gravatar

Re: Using OLAP for LightSwitch

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
Gravatar

Re: Using OLAP for LightSwitch

@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
Gravatar

Re: Using OLAP for LightSwitch

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
Gravatar

Re: Using OLAP for LightSwitch

@Dan Moyer - I posted the code.

By Michael Washington on   7/25/2011 7:36 PM
Gravatar

Re: Using OLAP for LightSwitch

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
Gravatar

Re: Using OLAP for LightSwitch

@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
Gravatar

Re: Using OLAP for LightSwitch

What kind of reports are ComponentOne using ?

By Mihai Moisei on   9/29/2011 8:44 AM
Gravatar

Re: Using OLAP for LightSwitch

@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

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 

Microsoft Visual Studio is a registered trademark of Microsoft Corporation / LightSwitch is a registered trademark of Microsoft Corporation