All posts by David Wise

SharePoint Service Pack 1 Links


Microsoft has finally released the much awaited Service Pack 1 for SharePoint.  Unfortunately, not all of the links provided on the Microsoft download pages seem to go to the right places.  Here are the actual links that I've found.

SharePoint Service Pack 1 Resource Center

Planning and Deployment Guide (Word Document)

Windows SharePoint Services 3.0 SP1 – Download / List of Fixes / Excel

Microsoft 2007 Office Servers (includes MOSS) SP1 – Download / List of Fixes / Excel

SharePoint Designer SP1 – Download / List of Fixes / Excel (includes Office 2007 SP1)

Revised SP1 SDK for WSS / MOSS / AJAX in SharePoint

System Center Operations Manager 2007 Packs – Announcement / Download

The Excel versions of the fixes are far more useful as they include the actual problem fixed rather than links to hotfixes that you have to sift through.

Update: Fixed the Excel links as Microsoft changed all of them overnight.  They also split out the changes for WSS from the main Excel file for Office Servers.

What the Heck is RSS?


The intent is for this to be one of those links that you send to your family when they ask: "What is RSS? Why would I care about such a thing?". If you are already familiar enough with RSS to know what it means, then this article is not for you. Move along.  Nothing new to see here. You can go about your business.  These are not the droids you are looking for.

Good, now that they're gone, lets get down to business.

Why do I care about RSS?

Definitions can wait; this is the meat of it. RSS is basically a way to get the news you want from the sources you want in the format you want, when you want it. Think of it as your own personalized Associated Press service. There is even a little bit of dark pleasure involved as you are the editor in this whole process and you can "fire" sources you dislike by unsubscribing to their feed (explained later). Don't lie, I'm sure there are a few columnists in your local paper you'd like to fire and with RSS, you can!

Much more than news

It is true that the most common use for RSS is news feeds, but it can be used for anything that might be of interest to other people. Some sites use it for press releases, some for bug reports, some for articles of interest, others are just for fun and, of course, there are some focused on the latest and greatest deals.

Best of all, you can include sources that most newspapers can't or won't use. Opinions, technical journals, Alumnus organizations, hobbies, etc. Almost anything that you have an interest in has an RSS feed available somewhere for it.

Ok, got it. Now what is it?

RSS stands for Really Simple Syndication and it simply is an agreed upon way for web sites to make anything of interest available to anyone that might be interested in it. These items are available in things called "feeds" that are nothing more than a bunch of news items grouped together.

Think of a feed as something like a newspaper. You "subscribe" to your daily paper, and you "subscribe" to a feed. There's just no messy ink to smear or double-collecting paperboys to deal with. The difference is that a newspaper is actually what is known as an "aggregate feed" meaning that it is a bunch of different topics (news, politics, sports, entertainment) all bundled into one big paper. If all you read is sports, then the rest of the paper just gets in your way. Likewise, on a properly designed site, you can get an aggregate feed of everything, or you can subscribe to just the sports. Try telling your local paper to only deliver the sports section and see what response you get!

FoxNews and CNN are both good examples of this. You can subscribe to only what you are interested in and ignore the rest. Yes, that means you can almost completely filter Britney Spears out of your news.

Hopefully, I have your attention about why you should be interested in RSS. The next steps are the mechanics of actually setting yourself set up to be able to read feeds.

How do I get a started?

First off, you need some software called a reader (a.k.a. Feed Reader, RSS Reader). This software is available in two formats: online and desktop application. The largest online reader is Google Reader and it happens to be free. The interface is a little strange, but it works for a lot of people.

There are several free desktop reader applications out there as well, such as FeedReader and SharpReader, but I strongly recommend Omea because it has plenty of features to grow with. Technically, Internet Explorer 7 has a reader built into it as well, but it is so limited that you will probably outgrow it in the next 10 minutes.

The next thing you need is a feed to subscribe to. Think about your interests; What sites do you visit regularly? Where do you get your news from? Go to some of those sites and look for one of the RSS feed icons (rss_icon_Small xml rss). Some sites hide the feed link in text in footers and you have to actually search for "RSS", "XML", "feed" or "subscribe" in the page to find the link for it. Annoying, but if it is a site you like, it's worth hunting for.

Clicking on the link or the icon should bring up a page that only has the news items in it, usually with no advertising or even site identification. In some cases, you will bring up a page that almost looks like computer code. Don't worry, this is the actual feed that the reader uses but you won't have to see it in this form again. In other cases, the link is actually a list of feeds available, in which case, click on one of the feeds that interest you. Now go to the address bar of your browser and copy the URL. You will need this in order to tell your reader what to subscribe to.

Next, you need to actually subscribe to the feed. The term subscribe is a bit of a misnomer here in that you don't really subscribe to anything in the traditional sense as that implies that you are having something delivered. Instead, you are telling your reader to keep checking this feed and to let you know when it changes. You don't have to provide any personal information or any money to subscribe, not even your email address. The feed you are subscribed to has almost no information about you.

The actual mechanics of subscribing depend on the reader you have chosen to use, but they all have an option called something like "Add Subscription", "Add feed" or "new feed" or even simply "subscribe", usually found on the File menu. Click that and paste in the URL you copied earlier, accept any defaults listed for the other options and click OK. Don't worry about those other options for now, they aren't too important and the defaults are usually good enough for most people.

Your reader should now load the feed from the site and give you a list of news items from that site that you can pick and choose from to read. This is great, but you don't get much benefit from one feed! Go find more! Be sure to look for RSS feed options on all of the sites that you visit regularly. Subscribe to anything that interests you – you can always unsubscribe later.

Here is where it gets fun: as long as your reader is open, it will periodically check your feeds and update with the latest articles. Depending on the reader, it might also put a little popup on the screen with the latest news or play a little sound. All automatically. You no longer have to try to remember all the sites you were interested in or keep track of changes or anything. If it is new, it will be in your reader waiting for you. If you close your reader, it will simply look for new items the next time you open it.

I WANT MORE CONTROL!!!

Ok, ok, sheesh. All you "Type A" people out there. Fine, you want control? You
’ve got it! Remember those options I told you not to worry about when you subscribed to the feed? Take another look at them (in most readers, right-click on the feed and click on "properties"). The main one that most people change is the update frequency. Most feeds are ok with the default, which is usually 8 hours, but some feeds (like FoxNews and CNN) update very regularly. Change that value to 1 hour to get frequent updates and satisfy your inner news junkie. Odds are that you can also rename the feed to something more meaningful than the default name of the feed. Some readers offer dozens of properties that you can fiddle with.

Ok, you got me hooked but what if I want to change readers?

Ah, but you don't want to lose all those feeds you set up, right? Fear not! Nearly every reader on the planet has an Import and Export feature that supports OPML. What is OPML? You don't really care, other than to know it is an agreed upon way of listing all the feeds you have subscribed to. You Export your feeds as OPML from your current reader. Then Import it into your new one. Voila! You might have to go mark everything as read again because the new reader doesn't know where you left off reading, but that's about it.

What reader do you use, personally?

Omea. I find it easy enough to get started with and it has plenty of features so that when I find myself thinking: "If only I could…", odds are good that Omea already supports whatever I had in mind. It was just in there waiting for me to realize I needed that feature 🙂 With the 158 feeds that I watch, I end up needing a lot of features that I hadn't imagined needing when I first started using RSS.

And, in conclusion…

Hopefully, that is enough to get you into the exciting world of information via RSS. Once you start using it, you will have a hard time going back to reading sites to get your news or even (gasp) picking up a printed paper with its "ancient" 12 hour old news 🙂

Connecting SQL Reporting Services to a SharePoint List


There is a multitude of blogs that discuss how to access SharePoint data from SQL Reporting Services, so why another?  Simply because I had not found one that exposed all of the land mines I seem to hit when doing this.  So, I thought I’d try my hand at creating a detailed guide-map to the mine field.

The Requirements

In order to do this, you must have :

  • Visual Studio 2005 (I’m sure this works in 2008 as well, but I haven’t tried it yet)
  • SQL Reporting Extensions.  These are installed by default when you install SQL Server
  • A SharePoint list exposed Anonymously or via Windows Integrated Authentication (more below)

Accessing the List

The Report Designer requires that the Data Source either require no authentication or uses Windows Integrated authentication.  Other options are available when defining the Data Source but you will not be able to use them as they are not supported for web services by the designer.

Note: If your SharePoint list requires Windows Authentication then your development machine *must* be in the same domain or a trusted domain as the SharePoint server.  If you are developing on a system that is not in the domain of the SharePoint list you are attempting to access, you will not be able to proceed.  Brutal, but there you have it.

The Steps

Start Visual Studio

Select File -> New Project -> Business Intelligence Projects -> Report Server Project.  Name and save the project.

In Solution explorer, right-click on Shared Data Sources and select Add New Data Source

FliE3

Make sure you specify the Type as XML and put the proper URL to your server’s list.asmx web service page.  This is usually simply http://<server>/<path>/_vti_bin/lists.asmx, replacing <server> with your server name and <path> with the path to the site with the list you are trying to access.

Click the Credentials tab and make sure you set it to Windows Authentication (default) or No Credentials (if your SharePoint site allows anonymous access).

FliEC

The other options are not supported by the Designer and will throw an error along the lines of “An error occurred while executing the query…” when you try to fetch the data.

Now that you have the data source defined, you will need to define the report.  To do this, right-click on the Reports folder and select Add-> New Item, then add a Report.  Do not use the Add New Report option on the right-click menu as that forces you to use the report wizard which can’t properly connect to the web service to get data.

Fli11F

Fli120

Open the report and click on the Data tab and select <New Dataset…> from the Dataset dropdown

Fli140
Now enter a name for your dataset and make sure to pick the Data Source you created a few steps earlier.  The most essential thing on this form is to set the Query string properly.  It should be :
<Query>
    <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems"/>
    <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
</Query>

From there, click on the Parameters tab enter your parameters.  See the Parameters section below for more information.

Fli142

Parameters

There are 5 parameters that can be passed: listName, viewName, query, rowLimit and queryOptions and yes, they must be this exact case.  The catch here is that if you define all those parameters you will get data in the Data view, but then the Preview will fail with a multitude of messages, usually along the lines of “The Value expression for the parameter … contains an error … “.  To get around this, define only the parameters you are actually passing values for.

listName

This tells the web service where to get the data from and it is the only required parameter.  You can give it either a list name or a Guid.  If you are unsure how to get the Guid, fire up Stramit CAML Viewer and browse to the list or simply click Settings->List Settings while viewing the list.  The list Guid will be URL encoded in the querystring after ‘List=”.  You can quickly decode it here.

viewName

The viewName tells the web service what view of listName to query in order to pull back data.  This is not required but strongly recommended because the Report Designer mangles the query parameter with severely limits your options for filtering data from the designer side of this process.  This is also an extremely picky parameter and I have yet to be able to get it to work consistently with a actual name of a view and have had to always use a Guid.

Note: If you do not specify a viewName, it will use whatever view is defined as the default for the list as the filter/sort for the data.  This is usually the All Items view and will likely include way more data than you want.

query

Do not use this parameter.  It is extremely useful for people calling the web service from code but does not work with the report designer.  I suspect that designer does some extra encoding of the CAML that this parameter normally accepts which confuses the web service to no end.  If someone finds a way to actually use this parameter from designer, please let me know!

rowLimit

The number of items to return.  SharePoint defaults to 100 so if you need more than this, you will need to include this parameter along with a number exceeding the number of rows you are likely to get.

queryOptions

Do not use this parameter for the same reason as query: it gets improperly encoded by the report designer.

Click OK and then try to get your list of fields by clicking the Refresh Fields icon ( Fli143 ) in the data view.  A small + should appear next to your report name.  Click on that to see all the fields it found.  If you don’t see all the fields you were expecting, be sure to read the tip in the Annoyances section at the end of this posting.

Last step – get some data by clicking the Run icon ( Fli1EA ) on the Data tab.  It should pop up a dialog with the parameters you defined earlier.  Make sure all the parameters and values are there that you expect and click OK.

That’s pretty much it.  I do have some general thoughts on the whole process that I’ve tacked on below.  Hopefully, this covers most of the quirks and oddities associated with this process.

 

General Troubleshooting

I cannot recommend Fiddler highly enough.  With this running on the dev machine you can easily see everything that is going on in the actual SOAP calls that are responsible for those vague errors that the designer throws out.  (click to see details)

Fli154

Guid’s versus Names

Ok, so do I reference the list using the Guid or name?  There isn’t an easy answer here as this is the classic catch 22.  The Guid is the ID of the item regardless of the name and is the natural thing for developers to want to use.  Unfortunately, if you are in an environment where code is migrated from a Dev farm through test/qa and then to Production, that Guid will change in each environment.  The Name is much friendlier and works across environments, but names have a tendency to change over time which will break your report.  Choose what works best in your environment.

A Word About Formatting

SQL Reports has no clue what to do with many of the columns used in SharePoint, so you might end up having to write some code to handle these.  The first you will probably see of this are the SharePoint fields that contain lookup values because these will show up on your report as something like “245#;My real name“.  Pretty nasty.

What you can do is add the snippet of code below to the Code section of the report.  To get there choose the Layout view, then Click on Report -> Report Properties from the main menu.  Click on the Code tab and paste the code below in the window

function GetNameFromSP(pFullID as string) as string
  dim strRet as string
  dim iPos as integer

  if pFullID = nothing then return ""
  if pFullID = "" then return ""
  iPos = Instr(pFullID, ";")
  if iPos &lt; 1 then return pFullID

  return Mid(pFullID, iPos +2)
end function

Then right-click on the field in the report that you want to fix this with and select Expression.  In the Expression Builder window, set it to the following:

=Code.GetNameFromSP(<your field reference>)

It is possible to use a .Net assembly for this function as well, but that is way beyond the scope of this article.  Besides, this method doesn’t require any special installation steps on the target server.  If you are creating dozens of reports where you need this behavior or others like it, then it makes sense to look into the assembly approach.

A Word About Sorting

Odds are that the second place that you will hit the formatting snag mentioned above is when attempting to sort the report by one of the fields containing such values as it will sort by the ID part of the value string and not the name.  The easy fix is to use the same Expression as above in the Sorting and Grouping section of the report, which now allows you to sort on the real name.

Annoyances About the Report Designer in Visual Studio

Overall, working with the Report Designer in Visual Studio goes pretty good, but there are some soggy areas that you are bound to step in eventually.  I’m pretty sure these are related to working with either web services in general as a data source, or SharePoint web services specifically as I’m not seeing a lot of people reporting this problem over the net.

Vanishing Parameters

For reasons known only to designer itself, it will occasionally completely delete your list of parameters.  If you suddenly start getting errors or the wrong data and haven’t changed anything substantial, make sure your parameters are still defined.  Just make sure you have them written down somewhere where you can refer to them in order to enter them again.  I guarantee you will hit this one at least once.

Erroneous Errors

Sometimes something gets stuck in memory and designer will keep throwing an error when you try to get data or preview what should be a good data call.  Nine times out of ten, just closing the report and re-opening it will take care of this.  It’s very easy to lose an hour or more chasing a problem that isn’t really there from this.

Now you have data, Now you don’t

Fetching the data / previewing the report will work occasionally fail one attempt, then work perfectly the next with *no* changes in between.  This is a minor irritation and can usually be fixed by closing and re-opening the report.  After a while, you get used to trying everything twice.  If it fails on the second attempt, you probably really have an error.

Missing Columns

When you build the list of columns available for the report in Designer, it takes only the data in the first row of data returned.  If any of those columns are null, it won’t include the column.  Make sure all the vital columns have data when you create the report and you should be fine, even if that means manually editing them for a short time to put temporary data in.  Update: Maria has offered a solution to this.  I’m not able to try it at this moment but it looks promising – thanks Maria!

Note: if you know of fixes to any of the above, please, please post it in the comments!

 

Some Helpful Links

New SharePoint Resource Center


It looks like Microsoft has finally put together the first installment of a true Resource Center focused on SharePoint.  It has direct links to a lot of existing content that was previously scattered all over MSDN, some of which you might not have seen before.

http://msdn2.microsoft.com/en-us/sharepoint/bb964529.aspx

It is still kind of light on content but we can hope that Microsoft will continue the effort and turn this into a key launch point for all things SharePoint related.

Hello, Live Writer!


I started using Windows Live Writer late last week to author my blog entries and have to say that I am very impressed.  In fact, the last 3 posts on this blog were all done with it.  Once configured, it is fast, extremely easy to use and focuses solely on the task of editing and posting blog entries.  This means that there is no menu/UI clutter from a bunch of bloat (yet) so it is pretty easy to find what you are looking for.

Some of the cool things I've found so far:

  • Save drafts locally
  • Save drafts on the blog site as an unpublished post
  • Publish blog entries to the blog site (kind of required!)
  • Web Preview mode that shows the post using styles and layout from your actual blog site
  • Edit and post entries to different blogs from the same editor
  • Auto-upload embedded images (if the site supports it)
  • Insert images from several sites (I use Flickr and SmugMug but there is a Community Server plug-in as well)
  • Ability to scale images using the thumbnails created by the Image Hosting site

Sample Insert menu

To make blogging even easier, I've discovered a few related goodies that work well with pretty much any blog editor.

  • An add-in for SnagIt that uploads my screen captures to Flickr right from the SnagIt editor
  • A "Send To …" utility for both Flickr and SmugMug that will upload an image file from the right-click menu

Wonderfulness (?) aside, this is still a "dot OH!" product from Microsoft so there are a few small bugs yet to be worked out as well as the occasional crash but it is a strong enough product that I can easily overlook those. I've been spoiled now and can't see myself ever going back to Word or OneNote to compose my blog posts.