1. Ajouter le Chart Web part sur une page
Voici les différentes étapes que nous allons suivre pour mettre en place notre graphique :
Téléchargement et installation du Silverlight Toolkit de Codeplex
Vous pouvez télécharger le Microsoft Silverlight Toolkit sur le site suivant : http://www.codeplex.com/Silverlight
Voici les différentes étapes de l’installation du Toolkit :
Création d’une liste personnalisée sur le site SharePoint Online
Dans cette section nous allons créer une liste personnalisée dans laquelle nous allons stocker le nombre d’habitants des principales grandes villes françaises.
Voici les différentes étapes pour créer cette liste :
|
Title |
Population |
|
Paris |
2125851 |
|
Marseille |
797491 |
|
Lyon |
445274 |
|
Toulouse |
390301 |
|
Nice |
343123 |
|
Nantes |
270343 |
|
Strasbourg |
263941 |
Création d’une application Silverlight
Dans cette section nous allons voir comment créer une application Silverlight intégrant un graphique. Ce graphique consommera les données de la liste créée précédemment via l’utilisation des Web Services SharePoint Online.
Voici les différentes étapes de création de l’application Silverlight :
<chartingToolkit:Chart x:Name="MyChart" Margin="10"> <chartingToolkit:Chart.Series> <chartingToolkit:ColumnSeries Title="Population" IndependentValueBinding="{Binding Title}" DependentValueBinding="{Binding Population}" /> </chartingToolkit:Chart.Series> </chartingToolkit:Chart>
Dans le Tag <UserControl /> ajouter les lignes suivantes :
xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;
assembly=System.Windows.Controls.DataVisualization.Toolkit"
InitializeComponent(); ListsSoapClient proxy = new ListsSoapClient(); proxy.GetListItemsCompleted += new System.EventHandler
<GetListItemsCompletedEventArgs>(proxy_GetListItemsCompleted); XDocument doc = XDocument.Parse("<Document>
<Query /><ViewFields /><QueryOptions /></Document>"); XElement query = doc.Element("Query"); XElement viewFields = doc.Element("ViewFields"); XElement queryOptions = doc.Element("QueryOptions"); proxy.GetListItemsAsync("Population", "", query, viewFields,
"10", queryOptions, "");
void proxy_GetListItemsCompleted(object sender,
GetListItemsCompletedEventArgs e) { XElement result = e.Result; var Cities = from x in result.Elements().First().Elements() select new ListResult { Title = x.Attribute("ows_Title").Value, Population = Convert.ToDouble(
x.Attribute("ows_Population").Value) }; ColumnSeries cs = MyChart.Series[0] as ColumnSeries; cs.ItemsSource = Cities; }
public class ListResult { public string Title { get; set; } public double Population { get; set; } }
using SilverlightApplications.ServiceReference1;
using System.Xml.Linq;
using System.Windows.Controls.DataVisualization.Charting;
Déploiement et intégration de l’application Silverlight sur le site SharePoint Online
Dans cette section nous allons voir comment déployer une application Silverlight sur un site SharePoint Online puis comment ajouter cette application dans une page.
<object data="data:application/x-silverlight-2,"
type="application/x-silverlight-2" width="100%" height="100%"> <param name="source"
value="ClientBin/SilverlightApplications.xap"/> <param name="onError" value="onSilverlightError" /> <param name="background" value="white" /> <param name="minRuntimeVersion" value="3.0.40624.0" /> <param name="autoUpgrade" value="true" /> </object>
Attention : il faut remplacer le tag <param name="source" value="ClientBin/SilverlightApplications.xap"/> par <param name="source" value="SilverlightApplications.xap"/>
Exercise 1: Creating and Managing Office SharePoint Server 2007 Sites
Creating a site collection and two sites
• On the Start menu, point to All Programs, and then point to Microsoft Office Server. Then click SharePoint 3.0 Central
Administration.
Internet Explorer appears, and the Central Administration Web page is displayed.
Click the Application Management tab.
• In the SharePoint Site Management section, click Create site collection.
The Create Site Collection page appears.
In the Web Application section, click http://litwareportal:18097/, and then click Change Web Application.
• In the Select Web Application -- Web Page Dialog dialog box, click SharePoint – 80.
• On the Create Site Collection page, in the Title box, type Sales Sites
In the Description box, type Sale Group Site Collection
• In the Web Site Address section, click /sites/ in the list. Then type SalesSites in the adjacent box.
• In the Select a template list, click the Enterprise tab, and then click Document Center.
• In the Primary Site Collection Administrator area, in the User name box, type Administrator and then click the Check Names icon to verify the user name.
• Click OK.
When the Top-Level Site Successfully Created page appears, click the http://litwareportal/sites/SalesSites link.
The Sales Sites home page appears in a new window.
Click Site Actions, and then click Create.
In the Web Pages section, click Sites and Workplaces.
• In the Title box, type Sales Search
• In the Description box, type Sales Search Center
• In the URL name box, type Search
• In the Select a template list, click the Enterprise tab, and then click Search Center.
• Accept all other default settings. Then, near the bottom of the page, click Create.
The Sales Search site is created.
Click the Home tab.
Click Site Actions, and then click Create.
In the Web Pages section, click Sites and Workplaces.
In the Title box, type Sales Wiki
• In the Description box, type Sales Group Wiki Site
• In the URL name box, type SalesWiki
• In the Template Selection list, click Wiki Site.
• Click Create.
The Sales Wiki Web site is created.
Click the Home tab. Leave Internet Explorer running – you will use it in the next exercise.
Exercise 2: Activating and Deactivating Office SharePoint Server 2007 Features
Activating and deactivating site collection and site features
Activate site collection features for the Sales Sites site collection.
Click Site Actions, and then click Site Settings.
In the Site Collection Administration section, click Site collection features.
Click Activate for Office SharePoint Server Publishing Infrastructure.
When the page has reloaded, click Activate for Office SharePoint Server Search Web Parts.
Activate and Deactivate features for the Sales Wiki site.
Click the Sales Wiki tab.
• Click Site Actions, and then click Site Settings.
• In the Site Administration section, click Site features.
Click Deactivate for Office SharePoint Server Enterprise Site features.
Read the warning message, and then click Deactivate this feature
Click Activate for Office SharePoint Server Publishing. This feature has a dependency and requires that Office SharePoint Server Publishing Infrastructure be activated at the site collection scope. You activated the required feature in the previous task.
• Make a note of the features that are currently active.
Review the active features in the Sales Team Site site.
Click the Sales Search tab.
• Click Site Actions, and then click Site Settings.
In the Site Administration section, click Site features.
• Make a note of the features that are currently active.
• Close all instances of Internet Explorer.
Configuring Excel Services / SharePoint 2010 And Configure reporting for Project Server 2010
Configure reporting for Project Server 2010
To add a login for the report authors group
Commentaires