Silverlight chart to display InfoPath data in SharePoint
See a demonstration of how you can use Silverlight in SharePoint 2010 to visualize and analyze data that is stored in one or more InfoPath forms stored in a SharePoint form library.
An often requested feature when working with InfoPath is the ability to visualize data from an InfoPath form in a chart.
Unfortunately, InfoPath does not come with a chart control out-of-the-box, so if you want to visualize InfoPath data, you would either have to use a (third-party) ActiveX control or use some other method such as for example link an InfoPath form to an Excel spreadsheet through Excel Services in SharePoint to be able to visualize data.
However, another more elegant solution is to use Silverlight. Silverlight not only integrates beautifully with SharePoint 2010, but you can write .NET code just like you would for any other .NET client application. And the latter ability allows you to retrieve and read InfoPath forms in Silverlight applications. You can then use the chart control from the Silverlight Toolkit to visualize data from InfoPath forms that are stored in a SharePoint form library.
The InfoPath video below is a demonstration of how you can create a solution that combines .NET programming with the Silverlight client object model of SharePoint 2010 to dynamically retrieve, read, gather, and visualize data from one or more InfoPath forms that are stored in a particular SharePoint form library in a chart in a Silverlight application.
Functionality of the InfoPath 2010 Silverlight chart application includes:
- Dynamic retrieval of the names of InfoPath forms stored in a SharePoint form library.
- A multi-select drop-down list box to select one or more InfoPath forms for data visualization.
- Dynamic retrieval of entire InfoPath forms from the SharePoint form library.
- Reading of repeating table data from one or more InfoPath forms.
- Two ways to gather and visualize InfoPath data in the Silverlight chart.
This InfoPath/Silverlight/SharePoint solution took me approximately 5 hours to create, but because it combines InfoPath skills with knowledge of Silverlight and SharePoint, a more realistic development time would be 8 to 16 hours.
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author.