By Kostas Christodoulou on Tuesday, February 7, 2012
In previous posts I made reference to views (DB or RIA) as an alternative (amongst other well-known potentials of views) to search and sort against fields that would normally be relations (lookups or however you want to call them).

From the very beginning I had an issue with SQL Server views imported to LS. LightSwitch had a very strange way to define the primary keys of the views. These “inferred” primary keys are most of the time very complex combined keys. And this is not an issue actually until you decide to add a relationship between this view (which 99% of the times has only one field as actual primary key) and another table. Then you realize this, otherwise benign, complex primary key is an issue (to say the least).

It was only recently, in this thread,...
By Michael Washington on 1/1/2012 10:56 AM

image

When you have a list of items that have a particular sort order, you may have the need to allow the end-user the ability to change the sort order. This article shows a solution…

By Kostas Christodoulou on Thursday, July 14, 2011
Immediately after using Excel Importer extension for the first time and trying to see how this would fit into our new “want to be” business application framework, I realized that defining the column mappings every time was definitely an issue.

So I decided to implement and integrate to the original Excel Importer a mechanism for using Column Mapping Templates as an optional capability. I decided to give it back to the LightSwitch community, where the original idea (msdn.com Lightswitch Samples) came from. You can download the the extension here. Feel free, no better yet, feel obliged Winking smile, ...
By Michael Washington on 5/12/2011 5:25 AM

With LightSwitch, there is no built in Printing. Here is a method that works. This will also show you how to create a custom template to allow you to print exactly what you want, not just the current screen...
By Michael Washington on 5/12/2011 4:19 AM
image

Printing in LightSwitch was previously covered here:

http://lightswitch.adefwebserver.com/Blog/tabid/61/EntryId/3/Printing-With-LightSwitch.aspx

The disadvantages of that approach are:

You have to make a custom control / You have to be a programmer to make reports Printing in Silverlight renders images that are slightly fuzzy In this article, we will demonstrate creating and printing reports in LightSwitch using Microsoft Report Viewer Control.

Note, you will need Visual Studio Professional, or higher, to use the method described here.

...
By Michael Washington on 4/11/2011 5:49 AM
image

LightSwitch is designed for “forms over data”, entering data into tables, and retrieving that data. Procedural code is required when you need to manipulate data in “batches”. Normally, you want to put all your custom code on the Entity (table) level, but for procedural code, you want to use custom code on the Screen level.

The Inventory Program To demonstrate procedural code in LightSwitch, we will consider a simple inventory management requirement. We want to specify sites and books, and we want to move those books, in batches, between the sites.

image

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