Export (0) Print
Expand All

Reporting and Printing in LightSwitch

LightSwitch doesn’t include built-in reporting and printing functionality, but you can incorporate reporting and printing into a LightSwitch application in several ways.

In many cases, you can report and print information if you first export it to Excel. Define a query to return the data for your report, create a screen that's based on the query, and then enable the Export to Excel button on the screen. End users can choose the button to export the on-screen data, format the data in Excel, and print it. For more information, see Exporting Data to Microsoft Excel.

Note Note

Export to Excel functionality is available only in LightSwitch desktop applications.

For repetitive reporting and printing tasks such as printing an invoice, you might want to create a Silverlight user control. You can lay out fields in the control, bind them to LightSwitch data, and use XAML code to define the appearance. You can then use the resulting control on a screen in your LightSwitch application. For more information, see Walkthrough: Printing an Invoice from a LightSwitch Application.

Note Note

Silverlight supports vector printing, but best results require a printer that supports PostScript.

You can create, deploy, and manage reports for your organization by using SQL Server Reporting Services, and you can extend and customize your reporting functionality by using programming features. Even if you don’t have a full version of SQL Server, you can still create reports by using Reporting Services in SQL Server Express with Advanced Services. For more information, see How to: View a SQL Server Reporting Services Report in LightSwitch, SQL Server Reporting Services, or Reporting Services in SQL Server Express with Advanced Services.

Office provides many built-in solutions for reporting and printing, but you can also use the Office development tools in Visual Studio Professional 2012 to automate the creation of reports and display or print them from your LightSwitch application. For more information, see Walkthrough: Creating a Report.

You can acquire several LightSwitch extensions that provide reporting and printing capabilities from vendors other than Microsoft. Among other options, you can find and download extensions from the Visual Studio Gallery.

To download extensions

  1. On the menu bar, choose Tools, Extensions and Updates.

  2. In the Extensions and Updates dialog box, expand the Online node, and then choose Visual Studio Gallery.

  3. In the Search Visual Studio Gallery text box, enter LightSwitch.

  4. In the list that appears, choose an extension, and then choose the Download button.

    You will be either prompted to install the extension or directed to the website of the vendor for the extension.

Show:
© 2014 Microsoft