Reporting Services 2005 in a MOSS Site

I wanted to run Reporting Services 2005 reports on my secure MOSS site so the user wouldn’t have to login twice. I did this by adding the Reports and ReportServer virtual directories to my MOSS site in IIS. The MOSS web server had an instance of Reporting Services running on it.

The Reports virtual directory is something like this
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportManager

The ReportServer virtual directory is something like this
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer

Both virtual directories need to have an “application” created in IIS and should use the same application pool that the MOSS web site uses.

Reporting Services IIS Settings

Now go to the Reports directory and modify the web.config file
The <sessionState> entry should be changed to this
<sessionState mode=”InProc” cookieless=”false” timeout=”20″ partitionResolverType=””/>

Also add the following to the <appSettings> section
<remove key=”ReportViewerMessages” />

Now go to the Reports directory and modify the RSWebApplication.config file
Look for the  <ReportServerUrl></ReportServerUrl> tags and add the URL to the virtual directory
If your MOSS site is then you would enter

Find this tag  <ReportServerVirtualDirectory>ReportServer</ReportServerVirtualDirectory>
and change it to  <ReportServerVirtualDirectory></ReportServerVirtualDirectory>
(Remove the “ReportServer” in the tag)

If you’re using the ReportServer virtual directory to render reports, you will probably also want to modify the web.config by adding this just after the </httpHandlers>
      <remove name=”PublishingHttpModule” />

This will get rid of the annoying Event Log message. See my post here for more info.

Add a Document Icon to the CBQ

When you want to change the look of the results in a Content By Query web part you modify the ItemStyle.xsl file in the Style Library of your site. You can find more information here.

I created a custom style to display links to documents. If you are pulling documents directly from a document library, you can make the modifications to the XSL that are documented in this posting.

My custom style is pulling links and titles from a custom list so I needed to get the file extension to generate the icon. Luckily there’s a function in the ddwrt namespace for doing this. It’s documented here.

So now you just need to build the link to the image and link it to the document URL. My variable with the document URL is @DocURL. You should substitute your own doc URL variable. Just add this to your style where you want the icon to appear.
<A TABINDEX=-1 href={@DocURL} target=_blank>
<img border=0 src=/_layouts/images/ic{ddwrt:GetFileExtension(@DocURL)}.gif alt={@DocIcon} style=vertical-align: middle;margin-right:4px />

Using Silverlight in SharePoint

Hopefully more on this soon, with examples. Check out this site with sample web parts. The site includes all of the code and walk throughs.

SharePoint Solution Generator Tips

I wanted to create a custom site definition so that I could create custom site collections. After some research I discovered there was a lot of messy, manual XML work involved. So I found the SharePoint Solution Generator (SSG) on the Microsoft site (download). This is exactly what I was looking for!
The SSG will take a customized site and create a Visual Studio 2005 project with all of the code necessary to create a new site definition. It even has an automated solution deployment.

I installed it on a test system and ran the SSG. I hit next to create a new site definition and it came back after a few minutes with an out of memory error message. I found out the first thing it does is enumerate all of the sites on your web application and populate a tree view control. I had too many sites…

My easy solution to this problem (on a test server) was to remove all of the content databases that didn’t contain the site I wanted to use as a template for my site definition. This might work for some of you but I still had too many sites so I created a temporary content database and site collection. I then created a sub-site using the site template I needed. (Whatever works for you.)
Found out you can also just remove the content database that stores the root site collection for the web application.

Now I could select the sub-site I wanted to use for my site definition. I selected the site, selected the lists I wanted and clicked Finish. Now I get an error “No SharePoint Site exists at the specified URL”. With a little digging I found that the wizard doesn’t work with Basic authentication! I added Integrated Security to the site in IIS and ran the wizard again. That did the trick.

Now I just need to figure out why none of my customized lists and libraries are not showing on the Quick Launch by default. (The XML files have the property set to TRUE.)

Hope this helps someone…

Fix the Annoying Event ID 5785

I found this in a blog a while ago but can’t find it now so here it is…
If you see this error in your event log the fix is fairly simple.

Event Type: Error
Event Source: Office SharePoint Server
Event Category: Publishing Cache
Event ID: 5785
Date:  5/19/2008
Time:  6:19:13 AM
User:  N/A
Computer: <server>
Unable to connect publishing custom string handler for output caching.  IIS Instance Id is ‘461376054’, Url is ‘http://blahblah/page.aspx&#8217;.

The solution is to modify the web.config of the application. Remove the PublishingHttpModule module that was added by the root web.config:


   <remove name=”PublishingHttpModule” />




SharePoint Survey Permissions

See comments below from Rodrigo for the complete steps 🙂

You have a survey that you would like people to fill out but not edit or delete responses. The settings are not obvious so here they are…
Go to your survey settings and click Advanced Settings.
Select “All responses” for Read AND Edit access
Click OK to go back to the Survey Settings page
Select “Permissions for this survey”
If the survey inherits permissions, click Actions – Edit Permissions and click OK on the dialog
Give all of the users Contribute rights

That’s it! Easy but not obvious.
This should remove the “Survey Settings” link on the survey page for users.