Category: Sharepoint 2007

Huntsville AL SharePoint User Group Presentation on BI

By , April 21, 2011

This past week I presented on Microsoft Business Intelligence at the Huntsville SharePoint User Group, now officially known as the Rocket City SharePoint user Group.

In the presentation I went over the three main SQL Server Components (SSIS, SSAS, SSRS) and PerformancePoint.  Then we went through a live demo of importing some data into SQL Server with SSIS, building a data cube on it with SSAS, and making reports in SSRS and PerformancePoint.

The entire presentation lasted about an hour, and luckily didnt have any major hiccups.

Click here for the presentation (8 MB)

Side effect of setting content databases to Offline

By , February 18, 2011

It is pretty common for people to want a large department, such as Marketing, to have their own content database, or they may want to limit a content database to just a few site collections.  I have seen two different ways of accomplishing this and no real description of the negative side effects of one of the methods, so here is what I have experienced.

First the recommended method is setting the limit in the content database’s properties, and the second method is disabling the content database when it has reached the desired threshold (marking it as Offline).  At first both solutions will work equally well, as when a content database is Offline, no new site collections will be added to the database, but new content and sub sites created in a site collection that is already stored in the database will continue to be stored in the disabled database.

A seemingly unrelated issue that is very hard to troubleshoot however will eventually occur if you use the Offline/Disable method, so don’t use it!

Each site collection has it’s cache of user information for it’s members called the User Information List.  It primarily saves the person’s account name, name and job title and it is supposed to be updated to match the information in the User Profiles via a timer job.  When a Content Database is marked as being Offline however this timer job will skip over the site collections in the Offline databases and not update the User Information List.  So, eventually you will have a listing of users with the incorrect job titles (due to promotions) or names if they are ever changed.  We all know that Executives and Managers want others to know their lofty job titles, so this is a potentially big issue.

To correct this, turn the Content Databases back online, and run the following:

List the databases that are out of date:
stsadm -o sync -listolddatabases <n>

Delete the Synchronization information for the out of date databases (IT WILL NOT DELETE THE DATABASES)
stsadm -o sync -deleteolddatabases

Then Force the Databases to Re-Sync
stsadm -o sync

The Databases should now re-sync and update the information.  The timer job will then forever keep up with it.  Alternatively you could skip the stsadm commands and the timer job would eventually run and pickup the online content databases, but I like a little instant gratification now and again.

Free Flash Chart Web Part for SharePoint

By , July 14, 2010

The first time I made a web part was a couple of years ago when I wanted to chart SharePoint data inside of SharePoint.  I found some free flash charts that seemed pretty functional and away I went.

The web part turned out pretty well and I may have gone overboard adding additional features to it, but it definitely served its purpose (been in production for 2 years without issues).  Since it was the first web part I ever made, the code isn’t the most efficient and it was my plan to always go back and rewrite it.  But, with the coming of SharePoint 2010 and it’s own Chart web part, I don’t think I will spend the time to improve this, so here it is.

It does Pie, Bar, Column, line, area, doughnut and funnel charts.  A couple of the charts support three series of data, 2 as columns and one line which is pretty impressive.  Here are a few images of it running in a production environment.  It works in MOSS 2007 and WSS 3.0.  I haven’t tested it in anything other than that.  Enjoy!

Download the Project Here

Download the WSP Here

 

SharePoint iPhone App Roundup

By , July 12, 2010

So, I just got an iPhone 4, upgrading from an old windows mobile phone, and decided to investigate what apps were out there for SharePoint.  Oddly enough, I couldn’t find a blog comparing what was available, so that is what I am doing.  I downloaded and tested everyone I could find in the App store, with the exception of one that had a server side component.

Below are the applications I tested, along with what i felt were the pros and cons of each.

My choices:

The best free app is I-Share, as it is the only one that lets you edit list data, and I feel that is a very important feature.  That said, if SharePlus’s next version (2.0) comes out and offers the edit capabilities it is promising, that would likely be my number one choice for a free app.

The best paid app has to be PocketPoint, again because it offers edit capabilities.  And for 5$ it inst overpriced unlike the paid version of SharePlus.

Happy Apping!

Moshare – Free

http://moprise.com/ 

Good Bad
Strong interface for documents No support for custom lists 
Easy to email documents or links to documents Cannot edit data
Can open and display documents Search doesn’t seem to work
Decent for viewing contact lists and documents  
Good calendar support  

 

SharePlusLite – Free.  10$ version provides offline sync of documents.  Next version is supposed to add edit capabilities to both free and paid versions

http://itunes.apple.com/us/app/shareplus-office-mobile-client/id364895421?mt=8

Good Bad
Ability to View Custom Lists Cannot edit data
View of lists shows multiple fields, not just title Search only finds subsites and lists, not items
Supports Multiple Views of Lists  
Can open and display documents  

 

IShare – Free

http://spyk.com/Products/iShare/Pages/iShare.aspx

Good Bad
Ability to View Custom Lists When viewing list: Only item’s title is displayed
Ability to edit data in lists Can only view lists by default view
Search includes all site content  
Can open and display documents  

 

PocketPoint – $4.99

http://endurosoft.com/Products/PocketPoint.aspx

Good Bad
Ability to View Custom Lists When viewing list: Only item’s title is displayed
Ability to edit/delete/create data in lists Found a couple of small bugs 
Search includes all site content  
Can open and display documents  
Easy to email/download documents  
Can switch between views of lists  
File sharing feature shares files on iphone  

Attache – $0.99

http://www.lucruminc.com/attache/

Good Bad
Ability to View Custom Lists When viewing list: Only item’s title is displayed
Good for viewing contacts Cannot edit anything
  No Search
  Cannot open documents

 

ISP-Browser – $0.99

http://www.isp-apps.com/

Good Bad
Ability to View Custom Lists When viewing list: Only item’s title is displayed
  Cannot edit anything
  Poor design

Birmingham Users Group on March 9th

By , March 1, 2010

It looks like I will be presenting about the options of Business Intelligence in SharePoint at the Birmingham SharePoint User’s Group on March 9th.

This will be a similar presentation to what I gave a couple of months back here in Huntsville but I will go into more detail and add a couple of demos.  It will be 2007 focused but I will highlight some of the changes coming in 2010 and maybe throw a demo or two in there on 2010 if I have the time to get a suitable environment set up.

Below is information on the session and hopefully someone will feel like showing up to listen to me :)

Microsoft SharePoint Business Intelligence Solutions for Everyone

Steve McDonnell
Senior SharePoint Consultant, IE-Dynetics

With Microsoft SharePoint, Business Intelligence does not have to be reserved for executives or companies with multimillion dollar IT budgets.  Whether you have Windows SharePoint Services or Enterprise MOSS, there are several options for Business Intelligence that we will dive into.  If you want to see a detailed overview of what Microsoft BI has to offer filled with real time examples of dashboards and reports, then this is a presentation for you.

Specific topics to be covered in this presentation:

  • WSS 3.0 BI Capabilities
  • The Data View Web Part
  • Custom Web Parts and Dashboard Solutions
  • SQL Server Capabilities (SSIS, SSAS, SSRS)
  • Enterprise MOSS 2007 Capabilities (Excel Services, KPIs, BDC)
  • PerformancePoint Server 2007
  • The Future of BI With SharePoint Server 2010

Two different database servers for SharePoint?

By , January 20, 2010

So, I ran across something strange that was new to me and I couldn’t find anything online that led me to believe that someone else had seen this either, so I am blogging about it.

I was brought in to troubleshoot a couple of random things at a customer site and once I got poking around, I saw that they were using two separate database servers for their single WSS 3.0 environment.  Their configuration database was in the embedded version of SQL Express (I will refer to this as SQL Express below) that installs automatically when you select a simple install and most of their content databases were on a full version of SQL Server 2005.

This was a 1 server farm and both SQL Express and SQL Server 2005 were on the same server that hosts WSS 3.0.  Well, to my knowledge it was impossible to have more than one database server or instance per farm and that seems to be correct according to the documentation I have found online.  Also, I was not sure how to even go about trying to replicate it… so how did this happen?

Well, they had upgraded about a year prior from WSS 2.0 to 3.0, and it is my best guess that when doing that upgrade they somehow (and for some strange reason) decided to go ahead and install a full version of SQL Server, and they were in some way able to start using it for new content databases, but keep the config and existing content databases on the SQL Express Install.

This is just a guess, and I hope that if someone else has seen this and stumbles across this blog that they can confirm or correct what I stated above.

The customer had no idea they had a full version of SQL installed (and it wasn’t licensed) so I basically rebuilt a new SharePoint server and used the database migration technique, moving databases from both instances of SQL into a fresh SQL Express install and everything is now running fine and dandy on one Database instance.  Strange eh?

Customizing the Smart Tools Grouped Chart to Accept Connections from Filter Web Parts

By , November 10, 2009

If you haven’t tried out the Smart Tools Web Parts yet I suggest that you do so. They are well done and pretty reliable, especially the chart web parts.  Well, for the most part they met my needs, but I wanted to be able to filter the data in the chart without having to create a lot of different views of a list.  I basically wanted some kind of drill down functionality, but I didn’t want to spend too much time developing my own tool, so I extended theirs!

I will go over how I added a little code to allow the Grouped Chart Web part to accept connections, filtering the data with the out of the box filter web parts in SharePoint Server 2007.   First though, here are a couple of screenshots so that everyone knows what I am talking about.

First the chart showing all of the Hours Worked, by every Employee, on every project this year.

No Filters

Then, in the next three images, I keep applying an additional filter until I have drilled down as far as I need. Note that I am using two different filter web parts – they all work and you can use any combination of them as shown.

No Filters

No Filters

No Filters

So, how did I do it? Very simple actually. They are nice enough to provide the source code for their charts at the Smart Tools codeplex site. From there, I added the c# file to a new web part project, added a little bit of code and it magically worked. First, we need to add a few using statements as shown. Now that I am writing this, I am pretty sure I don’t need all the Web ones, but oh anyways…

using wsswebparts = Microsoft.SharePoint.WebPartPages;
using aspnetwebparts = System.Web.UI.WebControls.WebParts;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.ObjectModel;
using System.Collections;
using System.Runtime.InteropServices;

The first thing I added was the code that allows the web part accept connections and defines what the connection points created will be named.

//Tell SharePoint the Web Part can accept connections
List providers = new List();
[aspnetwebparts.ConnectionConsumer("Simple Consumer", "IFilterValues", AllowsMultipleConnections = true)]
public void SetConnectionInterface(wsswebparts.IFilterValues provider)
{
this.providers.Add(provider);
if (provider != null)
{
if (View != null &amp;&amp; View != string.Empty)
{
List l = new List();
SPWeb contextWeb = SPContext.Current.Site.OpenWeb(SPContext.Current.Web.ServerRelativeUrl);

// Loop through all fields available in the specified View - We can filter on these
foreach (string fieldString in contextWeb.Lists[List].Views[View].ViewFields.ToStringCollection())
{
l.Add(new wsswebparts.ConsumerParameter(fieldString, wsswebparts.ConsumerParameterCapabilities.SupportsMultipleValues | wsswebparts.ConsumerParameterCapabilities.SupportsAllValue));
}
provider.SetConsumerParameters(new ReadOnlyCollection(l));
}
}
}

So at this point, the Chart web part can be connected to from out of the box filter web parts, but the filter does nothing yet. We need to add some logic to actually do some filtering. I decided to filter out everything that does not EQUAL what is selected in the filters. Alternatively, you could filter out things less than, greater than, etc, but I thought Equals made more sense.

The next thing I did was add the code to get all of the filters and add them to a List.

// Gets any filter parameters if there are connections Filter Parameters
bool validFilter = false;
List filterValue = new List();
List filterField = new List();
foreach (wsswebparts.IFilterValues provider in this.providers)
{
if (provider != null)
{
string prop = provider.ParameterName;
ReadOnlyCollection values = provider.ParameterValues;
if (prop != null &amp;&amp; values != null)
{
foreach (string v in values)
{
if (v != null &amp;&amp; v.Length != 0) // Apply the filter
{
filterField.Add(provider.ParameterName);
filterValue.Add("'" + v + "'");
validFilter = true;
}
}
}
}
}

The last thing we need to do is to do the actual filtering. There were a few ways to do this, but after seeing how the existing code was structured, I decided to just delete the rows I didn’t need from the Data Table they were using. The code is shown below.

if (dt != null) // Data available
{
// If there are filters via connections, remove entries not equal to the filter
if (validFilter)
{
for(int i = 0; i &lt; filterField.Count; i++)
{
string expression = filterField[i] + " &lt;&gt; " + filterValue[i];
DataRow[] results = dt.Select(expression);
foreach (DataRow dr in results)
{
dr.Delete();
}
}
}
}

And thats it – with very little code I made a pretty big enhancement to the Web Part (at least for my needs). In fact, you can use the code above to add connections to almost any web part you may have if you want them to use out of the box filters. If you create your own filter, things get a little more tricky.

Note, for this to work you need to have the Smart Tools already installed – I did not include the VisiFire files with this solution package.

Download C# File
Download Project Zip
Download WSP

Filtering Data View Web Parts By The Query String With Out of the box WebParts

By , November 9, 2009

So, recently I have been building a Project Management SharePoint site to better manage our customer projects, deploying it on our Extranet server that runs WSS.  There is quite a bit involved as I have been working on it for the better part of two weeks, pulling data from our LOB systems and surfacing it into our SharePoint Extranet, but what I want to highlight here is how I am filtering a set of dataview web parts on one page in particular.  There were a lot of articles out there on how to do cool things with Data View web parts that i referenced in building my solution, but there wasn’t anything that I could find that did the filtering the way I wanted to.

Basically, from the home page of my Projects website, there are a few charts and a Data View web part listing every project – you can click on each one to take you to a project details page.  I wanted this Data View to pass the ID of the project in the querystring to the project details page.  Well, this is straight forward as I just did a little formatting within SharePoint Designer, formatting each Project Item as a URL.  The challenge was on the Project Details page itself.

You can easily create a parameter in a Data View Web Part as shown here, and it worked quite well.  Once someone clicked on a project, the Project Details opened up as shown below.  If you want to see how to make a Data View Web Part look like the chart below, see this blog.



Well, this is kind of cool, but what if someone wanted to see the details of another project without having to go back to the front page and selecting it? I needed a way for the user to input another project ID number and see its details. Well, a DropDown box would be ideal, but there are way too many projects for that to work correctly, so I decided to use the Form Web Part (Remember I am using WSS 3.0 for this application) which gives me a Text box I can connect to other web parts. So, I created the web part and connected them all up, passing the value of the parameter I created earlier for each DataView. This worked great when there was nothing being passed in the query string, but if something was in the querystring it would override the connections made in the web parts. So, I decided to see if I could make it edit the QueryString when someone clicked the Form Web Part. This was actually pretty simple, it just took a little time to figure out.

Turns out, there is a source control button on the Form Web Part where you can directly edit the JavaScript – Pretty Handy. Well, all I had to do was insert the following snippit of JavaScript, and I was done.

<script type="text/javascript">
function moveMe(n){
    window.location = "projectdetails.aspx?ProjectID=" + n
}
</script>

<div onkeydown="if (event.keyCode == 13) moveMe(document.getElementById('myText').value)">
<input type="text" name="T1" id="myText"/>
<input type="button" value="Go" onclick="moveMe(document.getElementById('myText').value)"/>
</div>

All this code does, is define one small function that will redirect the page to a new URL (Modifying the Query String) with the input from the textbox. The two events are for someone clicking the Go button and pressing enter.

So, as you can see (sort of) in the image below, I now have a textbox that lets you modify the querystring, which is then read by three data view web parts to filter their data.



Pretty neat for not needing to put any code directly on the server.

Microsoft Business Intelligence Demo

By , September 29, 2009

We have a monthly users group at IE-Dynetics, and this week I will be the lucky one presenting. The topic is Microsoft Business Intelligence, and in about an hour I will demonstrate how the various Microsoft BI Products work together. If anyone is local to the Huntsville AL area and would like to attend (or just wants a free lunch), it will take place at 10am, Friday October 2nd, at 4900 Bradford Dr. in Huntsville. Lunch will be provided and served around 12.

I plan to demonstrate the following technologies and explain where each one fits into the big picture:

  • SQL Server (Including SSAS, SSIS and SSRS)
  • SharePoint Server 2007
  • SQL Server Reporting Services Integration with SharePoint
  • Excel Services and Key Performance Indicators (KPIs)
  • PerformancePoint Server 2007

Here is a link to a description of the event.

I’m looking forward to it and hope that they order in Pizza this time… I’m not a sandwich person.

Getting the SPUser object out of a person or group list field

By , September 3, 2009

So, as it turns out it is kind of tricky to get at the SPUser object stored in a person / group field.

I am building a workflow that needs to grab the email of a user, based on an SPUser object stored in a list field, and it gave me a little trouble so I decided to share. Nothing that I found online gave me the exact answer I was looking for, although this article got me headed in the right direction. Below is the code to grab the email stored in a SPUser object from a person field within a SharePoint Workflow.

SPFieldUser userField = (SPFieldUser)workflowProperties.Item.Fields.GetField("Customer");
SPFieldUserValue fieldValue = (SPFieldUserValue)userField.GetFieldValue(workflowProperties.Item[userField.Id].ToString());
string customerEmail = fieldValue.User.Email;

Kind of ugly if you ask me, but hey it works.