This document discusses various methods for building dashboards in SharePoint, including using calculated columns and Content Editor Web Parts to display graphics, and using SharePoint Designer and Data Form Web Parts with conditional formatting. It provides examples of how to build dashboards using these techniques as well as resources for additional information.
Greg Hurlman: Developing Custom Service Applications
Susan Lennon: Building SharePoint Dashboards
1. Building SharePoint Dashboards SharePoint Saturday, New York CityJuly 31, 2010 Susan Lennon MCITP (SharePoint Administrator 2010, DataBase Administration), MCSD.NET susanlennonmct@hotmail.com Twitter: susanlennon Blog: http://wss.LennonTechnologies.com/blog
2. Agenda Discuss dashboards and terminology Resources (Images, fonts, libraries) Methods to build dashboards Using Content Editor Web Parts and Calculated Columns to build a dashboard Using SharePoint Designer to build a dashboard Links and questions
3. Why Build Dashboards? Our bosses LOVE them! Right Information, Right Time, Right Format Provides similar capabilities that more expensive products include; e.g. Performance Point or MOSS Enterprise (KPIs or BDC); i.e. these methods work in both Windows SharePoint Services and MOSS Standard Dashboard is a web page containing Scorecards Scorecards are web parts (for SharePoint) that contain KPIs KPI is a Key Performance Indicator – a single metric or value that is often represented graphically; e.g. red or green stoplight, thumbs up or down, happy or sad face
9. Dashboard Methods Can use embedded HTML within calculated columns to display graphics Only works for SharePoint lists Can use SPD and Data Form Web Parts with conditional formatting Also works for XML, web services, databases within network, RSS Use Wingding fonts can provide different looks (e.g. l tnC D ) – see WingDings document
10. Using Calculated Columns to Build Dashboards Add calculated column(s) to SharePoint list – building HTML strings (usually based upon other columns) Can use SharePoint Designer (SPD) to build a workflow that updates column if calculated column does not provide enough capability Need “special” JavaScript (see PowerPoint Notes) to render HTML on a web part page JavaScript must be BELOW the list view web part Store JavaScript in Document Library (reusability, versioning, auditing) and refer to in a Content Editor Web Part (CEWP)
11. Using SharePoint Designer (SPD) to Build Dashboards Start with a simple SharePoint list Optionally, add a calculated SharePoint column, usually based upon another SharePoint column of type choice – this technique puts some of the control back in the hands of the end user Create a webpart page – within an existing document library (best practice – in Sandbox DL) Use SharePoint Designer (SPD) and Data Form Web Part to create dashboard view of list with conditional formatting Optionally, use special fonts to create symbols Can add legends above or below dashboard using out of the box (OOB) Content Editor Web Part (CEWP) Data Form Web Part can be exported and used as a web part elsewhere in the site
12. Data Views: Access to Data Improved OOB support for: Lists, SQL, OLEDB, XML, SOAP Services, Server Scripts, RSS, Business Data Catalog (w/Office SharePoint Server) New Combine data from multiple sources into single views New Fully extensible ASP.NET Data Source control model
13. Methods to Spice-up a DFWP with SharePoint Designer (SPD) Add a Data Form Web Part (DFWP) to a Web Part Page by either: Dragging a data source into a web part zone, or From the data menu select Insert Data View Any rows or columns can be formatted with Conditional Formatting (e.g. Red if negative, Black if positive) Images can be shown or hidden with conditional formatting Bar charts can be built using CSS
22. Questions? Coordinator of Hampton Roads SQL Server and SharePoint User Group in Virginia Beach, VA http://www.hrssug.org DOD SharePoint User Grouphttps://www.fleetforces.navy.mil/communities/spug Susan’s blog –http://wss.LennonTechnologies.com/blogemail: SusanLennonMCT@Hotmail.comTwitter ID: SusanLennon
Notas do Editor
For creating a column comparing a date (e.g. DueDate) to today’s date, make a new column named Today (doesn’t matter what type – can be a single line of text). Then create a calculated column using new (temporary) column, Today, with other Date column (e.g. DueDate) i.e. =If([DueDate]>=[Today],”C”,”D”) Then after calculated column is built, go back and delete (temporary) column named Today.
Be SURE to have focus set in Web Part Zone BEFORE trying to insert data view web part ( or data form web part)
<script type="text/javascript">/*Text to HTML - version 2.1Questions and comments: Christophe@PathToSharePoint.com*/function TextToHTML(NodeSet, HTMLregexp) {varCellContent = "";vari=0;while (i < NodeSet.length){try {CellContent = NodeSet[i].innerText || NodeSet[i].textContent;if (HTMLregexp.test(CellContent)) {NodeSet[i].innerHTML = CellContent;}} catch(err){}i=i+1;}}// Calendar viewsvarregexpA = new RegExp("\s*<([a-zA-Z]*)(.|\s)*/\1?>\s*$");TextToHTML(document.getElementsByTagName("a"),regexpA);// List viewsvarregexpTD = new RegExp("^\s*<([a-zA-Z]*)(.|\s)*/\1?>\s*$");TextToHTML(document.getElementsByTagName("TD"),regexpTD);// Grouped list viewsExpGroupRenderData = (function (old) { return function (htmlToRender, groupName, isLoaded) {var result = old(htmlToRender, groupName, isLoaded);varregexpTD = new RegExp("^\s*<([a-zA-Z]*)(.|\s)*/\1?>\s*$");TextToHTML(document.getElementsByTagName("TD"),regexpTD); };})(ExpGroupRenderData);// Preview pane viewsshowpreview1 = (function (old) { return function (o) {var result = old(o);varregexpTD = new RegExp("^\s*<([a-zA-Z]*)(.|\s)*/\1?>\s*$");TextToHTML(document.getElementsByTagName("TD"),regexpTD); };})(showpreview1);</script>