<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dutton Software &#187; SQL Server Reporting Services</title>
	<atom:link href="http://www.duttonsoftware.com/category/sql-server-reporting-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.duttonsoftware.com</link>
	<description>Code, plug-ins &#38; more</description>
	<lastBuildDate>Mon, 16 Jan 2012 06:30:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SQL Server Reporting Services &#8220;interal error occurred&#8221;</title>
		<link>http://www.duttonsoftware.com/2009/02/08/sql-server-reporting-services-interal-error-occurred/</link>
		<comments>http://www.duttonsoftware.com/2009/02/08/sql-server-reporting-services-interal-error-occurred/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 06:37:45 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=169</guid>
		<description><![CDATA[If you work with SQL Server Reporting Services (SSRS) 2005 for any length of time, you&#8217;ll see a number of ambiguous error messages.Â  I recently ran into the error below and found the solution quite easy.Â  Maybe you&#8217;ll encounter this one day and I&#8217;ll save you some headache. An error occurred during local report processing. [...]]]></description>
			<content:encoded><![CDATA[<p>If you work with SQL Server Reporting Services (SSRS) 2005 for any length of time, you&#8217;ll see a number of ambiguous error messages.Â  I recently ran into the error below and found the solution quite easy.Â  Maybe you&#8217;ll encounter this one day and I&#8217;ll save you some headache.</p>
<blockquote>
<div><em>An error occurred during local report processing.</em></div>
<div><em>The definition of the report &#8216;/Main&#8217; is invalid.</em></div>
<div><em>An internal error occurred on the report server. See the error log for more details.</em></div>
<div><em><br />
</em></div>
</blockquote>
<div>I could not view the error log, since I was previewing the report.Â  This problem happened simply because I had a Dataset with the same name as my table.Â  I had recently changed the name of my table to make more sense, not realizing that the Dataset was named the same.Â  To solve this problem, I renamed my table, but I could have renamed the Dataset just as easily.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2009/02/08/sql-server-reporting-services-interal-error-occurred/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Non-queried multi-value parameters in SQL Server Reporting Services</title>
		<link>http://www.duttonsoftware.com/2008/12/05/non-queried-multi-value-parameters-in-sql-server-reporting-services/</link>
		<comments>http://www.duttonsoftware.com/2008/12/05/non-queried-multi-value-parameters-in-sql-server-reporting-services/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 07:39:49 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[Multi-value parameters]]></category>
		<category><![CDATA[non-queried parameters]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=117</guid>
		<description><![CDATA[As a follow-up to my previous post on Easy multi-value parameters in SQL Server Reporting Services, I wanted to point out some information on non-queried, or static multi-value parameters. For my example, I&#8217;m using a parameter named &#8220;Time&#8221; with choices &#8220;Morning&#8221;, &#8220;Noon&#8221;, and &#8220;Night&#8221;. Â The values are M, N, and I respectively. Â You can see [...]]]></description>
			<content:encoded><![CDATA[<p>As a follow-up to my previous post on <a title="Easy multi-value parameters in SQL Server Reporting Services" href="http://www.duttonsoftware.com/2008/09/25/easy-multi-value-parameters-in-sql-server-reporting-services/" target="_self">Easy multi-value parameters in SQL Server Reporting Services</a>, I wanted to point out some information on non-queried, or static multi-value parameters.</p>
<p>For my example, I&#8217;m using a parameter named &#8220;Time&#8221; with choices &#8220;Morning&#8221;, &#8220;Noon&#8221;, and &#8220;Night&#8221;. Â The values are M, N, and I respectively. Â You can see how I set up the parameter in the following screenshot.</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-dialog.png"><img class="alignnone size-full wp-image-118" title="multi-value-parameters-non-queried-default-dialog" src="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-dialog.png" alt="" width="500" height="393" /></a></p>
<p>You can accomplish having all the checkboxes selected by default in two ways. Â The first way is to pass an object array of values, and the easiest way to do that is to use the Split command to split a string into a string array. Â I used <strong>=Split(&#8220;M,N,I&#8221;,&#8221;,&#8221;)</strong> as my default. Â I had to provide the second parameter for Split, the delimiter, because the default is space.</p>
<p>The second, and easier method, is to just add a line item for each item you want checked, as demonstrated in this screenshot:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-simple-method.png"><img class="alignnone size-full wp-image-123" title="multi-value-parameters-non-queried-default-simple-method" src="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-simple-method.png" alt="" width="459" height="153" /></a></p>
<p>Here is the resulting parameter list, showing all the items selected (same for either method):</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-results.png"><img class="alignnone size-full wp-image-119" title="multi-value-parameters-non-queried-default-results" src="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-results.png" alt="" width="244" height="56" /></a></p>
<p>Sometimes, you need to display the parameters of your report, perhaps so it could be regenerated later. Â You&#8217;ll need to print out that object array, so use the opposite of Split, <strong>Join</strong>. Â Below is a textbox with an expression of <strong>=Join(Parameters!Time.Label, &#8220;, &#8220;)</strong>, which joins the parameter values together with a comma and space separator.</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-display-label-code.png"><img class="alignnone size-full wp-image-120" title="multi-value-parameters-non-queried-display-label-code" src="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-display-label-code.png" alt="" width="299" height="72" /></a></p>
<p>Here is the result of the code, with two parameters selected shown:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-display-label-results.png"><img class="alignnone size-full wp-image-121" title="multi-value-parameters-non-queried-display-label-results" src="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-display-label-results.png" alt="" width="254" height="154" /></a></p>
<p>If you only put the parameter label in the textbox (i.e. using code <strong>=Parameters!Time.Label</strong>) then when you display the report, you&#8217;ll get the famous Reporting Services #Error message. Â You have to use <strong>Join</strong> in this case.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/12/05/non-queried-multi-value-parameters-in-sql-server-reporting-services/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>More on SharePoint &#8220;User not found&#8221; error with Reporting Services</title>
		<link>http://www.duttonsoftware.com/2008/10/30/more-on-sharepoint-user-not-found-error-with-reporting-services/</link>
		<comments>http://www.duttonsoftware.com/2008/10/30/more-on-sharepoint-user-not-found-error-with-reporting-services/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 05:05:34 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[WSS 3.0]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=101</guid>
		<description><![CDATA[Following up my initial post on the SharePoint &#8220;User not found error with Reporting Services in integrated mode, I wanted to post another reason for the &#8220;User not found&#8221; error. If, somewhere in the site author tree, you have user accounts that no longer exist, you will encounter the &#8220;User not found&#8221; error while viewing [...]]]></description>
			<content:encoded><![CDATA[<p>Following up my initial post on the <a href="http://www.duttonsoftware.com/2008/08/06/sharepoint-user-not-found-error-with-reporting-services-in-integrated-mode/" target="_self">SharePoint &#8220;User not found error with Reporting Services in integrated mode</a>, I wanted to post another reason for the &#8220;User not found&#8221; error.</p>
<p>If, somewhere in the site author tree, you have user accounts that no longer exist, you will encounter the &#8220;User not found&#8221; error while viewing the report and browsing the list of shared data sources.</p>
<p class="storytitle">I found two good blog articles about this issue as well as a solution here:</p>
<ul>
<li><a rel="bookmark" href="http://blog.krichie.com/2008/07/24/wherefore-art-thou-author/" target="_blank">Wherefore Art Thou Author?</a></li>
<li><a rel="bookmark" href="http://blog.krichie.com/2008/09/12/resetting-the-author-on-a-sharepoint-site-or-wherefore-art-thou-author-redux/">Resetting the Author on a SharePoint site, or Wherefore Art Thou Author Redux</a></li>
</ul>
<p>I modified the code a bit to just show the site author without resetting it.  I also changed the code to explicitly dispose of the SharePoint objects.</p>
<p>The utility takes two parameters, the first is the site URL.  If you only pass one parameter, it looks up the site author.  If you pass a second parameter (in the format of DOMAIN\USER), the site author will be reset to the value you supply.</p>
<p><span id="more-101"></span></p>
<p>To build, run this from the command-line:</p>
<pre>%WINDIR%\Microsoft.NET\Framework\v2.0.50727\csc /target:exe /out:SPResetAuthor.exe SPResetAuthor.cs
/reference:"%COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\ISAPI\Microsoft.SharePoint.dll"</pre>
<p>Source code of <a href='http://www.duttonsoftware.com/wp-content/uploads/2008/10/spresetauthorcs.txt'>SPResetAuthor.cs</a>:</p>
<pre>
using System;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

// Original code from: http://blog.krichie.com/2008/09/12/
//      resetting-the-author-on-a-sharepoint-site-or-wherefore-art-thou-author-redux/

namespace SPResetAuthor
{
  class Program
  {
    static void Main(string[] args)
    {
      if (args.Length < 1)
      {
        StringBuilder sb = new StringBuilder();
        sb.Append("\nSYNTAX: SPResetAuthor.exe (Site URL) [new owner]  \n");
        sb.Append("\nwhere:\n\n");
        sb.Append("\n\t(Site URL) - The web URL for"
            + " the site i.e. http://sharepoint/site/");
        sb.Append("\n\t[new owner] - The login account"
            + " for the new author, i.e. DOMAIN\\USER");
        Console.WriteLine(sb.ToString());
        return;
      }
      // Open the site collection
      Console.WriteLine("Opening site collection for: {0}", args[0]);
      using (SPSite site = new SPSite(args[0]))
      {
        // Open the web via the URL passed in
        Console.WriteLine("Opening site (web)...");

        using (SPWeb web = site.OpenWeb())
        {
          Console.WriteLine("Site (web) title: " + web.Title);
          if (args.Length == 1)
          {
            Console.WriteLine("Attempting to retrieve author for site");
            try
            {
              Console.WriteLine("web.Author: {0}", web.Author.ToString());
            }
            catch (Exception ex)
            {
              Console.WriteLine("Exception occured:\n{0}", ex.ToString());
            }
          }
          if (args.Length == 2)
          {
            Console.WriteLine("Resetting Author to: {0}", args[1]);
            SPUser user = web.EnsureUser(args[1]);
            web.Author = user;
            web.Update();
            Console.WriteLine("Author for site {0}, reset to {1}", args[0], args[1]);
            Console.WriteLine("Author ID: " + web.Author.ID.ToString());
            Console.WriteLine("Author Name: " + web.Author.Name);
          }
        }
      }
    }
  }
}
</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/10/30/more-on-sharepoint-user-not-found-error-with-reporting-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorting via parameters in SQL Server Reporting Services</title>
		<link>http://www.duttonsoftware.com/2008/10/22/sorting-via-parameters-in-sql-server-reporting-services/</link>
		<comments>http://www.duttonsoftware.com/2008/10/22/sorting-via-parameters-in-sql-server-reporting-services/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 05:09:01 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=77</guid>
		<description><![CDATA[In SQL Server Reporting Services (SSRS) there are two different methods for a user to sort their reports after they have been generated. Other folks have done a superb job of explaining each method, so I&#8217;ll just point you to their sites: The user can interactively sort on a header textbox by just setting the [...]]]></description>
			<content:encoded><![CDATA[<p>In SQL Server Reporting Services (SSRS) there are two different methods for a user to sort their reports after they have been generated. Other folks have done a superb job of explaining each method, so I&#8217;ll just point you to their sites:</p>
<p>The user can interactively sort on a header textbox by just setting the &#8220;interactive sort&#8221; properties:<br />
<a href="http://weblogs.sqlteam.com/joew/archive/2008/08/02/60666.aspx">http://weblogs.sqlteam.com/joew/archive/2008/08/02/60666.aspx</a></p>
<p>You can also sort using standard report parameters:<br />
<a href="http://www.databasejournal.com/features/mssql/article.php/10894_3492236">http://www.databasejournal.com/features/mssql/article.php/10894_3492236</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/10/22/sorting-via-parameters-in-sql-server-reporting-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapping with Virtual Earth in SQL Server Reporting Services</title>
		<link>http://www.duttonsoftware.com/2008/10/04/mapping-with-virtual-earth-in-sql-server-reporting-services/</link>
		<comments>http://www.duttonsoftware.com/2008/10/04/mapping-with-virtual-earth-in-sql-server-reporting-services/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 07:32:04 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[SSRS]]></category>
		<category><![CDATA[Virtual Earth]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=56</guid>
		<description><![CDATA[After seeing an excellent article by Wayne Berry about Mapping in SQL Server Reporting Services using the Google Maps API, I was inspired to see what I could do with Virtual Earth. The answer: not much. Virtual Earth does has a stellar SDK. The SDK is all JavaScript based, so it may not be used [...]]]></description>
			<content:encoded><![CDATA[<p>After seeing an excellent article by Wayne Berry about <a title="Mapping in SQL Server Reporting Services" href="http://www.31a2ba2a-b718-11dc-8314-0800200c9a66.com/2008/09/03/MappingInSQLServerReportingServices.aspx" target="_blank">Mapping in SQL Server Reporting Services</a> using the Google Maps API, I was inspired to see what I could do with Virtual Earth.</p>
<p>The answer: not much.</p>
<p>Virtual Earth does has a stellar SDK. The SDK is all JavaScript based, so it may not be used by SQL Server Reporting Services. Virtual Earth does not have a static mapping API. However, there are unsupported ways to get a single image tile&#8211;I used this <a title="veTile virtual earth example application" href="http://www.viawindowslive.com/Articles/VirtualEarth/CreatingaVEpluginforNASAsWorldWind.aspx" target="_blank">virtual earth example application (veTile)</a> as a basis for retrieving the tile URL.</p>
<p>I translated the code from C# to VB.NET so I could use it directly in reporting services. The code allows you to provide a latitude, longitude, and a zoom level and get back the closest virtual earth tile. The problem is that the resolution is only as good as a single map tile. The actual location of the latitude and longitude could be anywhere on the tile.</p>
<div id="attachment_57" class="wp-caption alignnone" style="width: 160px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/vemappingexample.jpg"><img class="size-thumbnail wp-image-57" title="Virtual Earth mapping example" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/vemappingexample-150x150.jpg" alt="Virtual Earth mapping example" width="150" height="150" /></a><p class="wp-caption-text">Virtual Earth mapping example</p></div>
<p>The good news, like the Google maps example, is that you can use the tiles in SSRS because no JavaScript is required. If you find a way to improve the resolution, let me know.</p>
<p>The SSRS source code of the report: <a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/vemappingexample.rdl.zip">Virtual Earth Mapping Example source code (vemappingexample.rdl)</a></p>
<p>In case you just want to get the map tile URL in Visual Basic, I am providing the <a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/virtual-earth-helper.txt">Virtual Earth Helper source code (VB.NET code)</a>. The class (VEHelper) has a single public static method (GetVETileUrl).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/10/04/mapping-with-virtual-earth-in-sql-server-reporting-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy multi-value parameters in SQL Server Reporting Services</title>
		<link>http://www.duttonsoftware.com/2008/09/25/easy-multi-value-parameters-in-sql-server-reporting-services/</link>
		<comments>http://www.duttonsoftware.com/2008/09/25/easy-multi-value-parameters-in-sql-server-reporting-services/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 05:26:50 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[Multi-value parameters]]></category>
		<category><![CDATA[Report parameters]]></category>
		<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=19</guid>
		<description><![CDATA[I recently came across an application where I needed to use a multi-value parameter in SQL Server Reporting Services (SSRS). Â I always seemed to have trouble with these in the past. Â This time I found them very easy to use because I found (re-discovered?) a simple way. The basic idea is to set up a [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across an application where I needed to use a multi-value parameter in SQL Server Reporting Services (SSRS). Â I always seemed to have trouble with these in the past. Â This time I found them very easy to use because I found (re-discovered?) a simple way.</p>
<p>The basic idea is to set up a parameter as if it were going to be a single value parameter with the topmost row selected by default. Â I will walk through the steps of this scenario.</p>
<p>I chose the AdventureWorks database to do this sample and focused on June 2004 Sales to get an easy dataset to work with.</p>
<p>1. Create the basic dataset:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/salesbyterritory-dataset.jpg"><img class="size-full wp-image-30 alignnone" title="salesbyterritory-dataset" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/salesbyterritory-dataset.jpg" alt="Sales By Territory Dataset" width="315" height="454" /></a></p>
<p>2. Set up the layout for the report:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/june-2004-sales-by-territory-layout.jpg"><img class="alignnone size-full wp-image-22" title="june-2004-sales-by-territory-layout" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/june-2004-sales-by-territory-layout.jpg" alt="" width="500" height="247" /></a></p>
<p>3. Preview the report with no parameters:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/june-2004-sales-by-territory-preview.jpg"><img class="alignnone size-full wp-image-23" title="june-2004-sales-by-territory-preview" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/june-2004-sales-by-territory-preview.jpg" alt="" width="372" height="468" /></a></p>
<p>4. Create a new dataset for the territories list:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/terroritylist-dataset.jpg"><img class="alignnone size-full wp-image-33" title="terroritylist-dataset" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/terroritylist-dataset.jpg" alt="" width="299" height="434" /></a></p>
<p>5. Set up the parameter, <strong>TerritoryID</strong>, like a normal single-value parameter. Â Be sure to set the default value to make it default to the topmost row in the list. Â In this case, the topmost is &#8220;Australia&#8221;, TerritoryID of 9.</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-dialog-single-parameter.jpg"><img class="alignnone size-full wp-image-29" title="report-parameters-dialog-single-parameter" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-dialog-single-parameter.jpg" alt="" width="500" height="387" /></a></p>
<p>6a. Apply the filter to the table. Â Notice that I am not editing the dataset, but simply adding a filter to the table properties. Â If you are usually the type to edit the dataset (like myself), just hang with me for a second. Â Right-click the edge of the table and then choose <strong>Properties</strong>:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/design-table-properties.jpg"><img class="alignnone size-full wp-image-21" title="design-table-properties" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/design-table-properties.jpg" alt="" width="394" height="414" /></a></p>
<p>6b. Â Modify the table properties to add the filter. Â Since you can&#8217;t read it all, it says</p>
<pre>=Fields!TerritoryID.Value = Parameters!TerritoryID.Value</pre>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/table-properties-applying-filter.jpg"><img class="alignnone size-full wp-image-31" title="table-properties-applying-filter" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/table-properties-applying-filter.jpg" alt="" width="448" height="432" /></a></p>
<p>7. Check the finished result. Â We now have a report with a single parameter. Â The topmost selection, Australia, is automatically selected and our filter is applied by default.</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/preview-single-parameter-and-filter-applied.jpg"><img class="alignnone size-full wp-image-34" title="preview-single-parameter-and-filter-applied" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/preview-single-parameter-and-filter-applied.jpg" alt="" width="377" height="300" /></a></p>
<p>8. So far, so good&#8211;there is nothing extraordinary about what we&#8217;ve done so far. Â Now, we simple make the parameter multi-value by changing the report parameters and checking the <strong>Multi-value</strong> box:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-dialog-multi-value-checked.jpg"><img class="alignnone size-full wp-image-28" title="report-parameters-dialog-multi-value-checked" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-dialog-multi-value-checked.jpg" alt="" width="500" height="387" /></a></p>
<p>9. Don&#8217;t rush off just yet, or you&#8217;ll see this error message when you choose <strong>Preview</strong>:</p>
<address>An error occurred during local report processing.</address>
<address>An error has occurred during report processing.</address>
<address>The processing of FilterExpression for the table &#8216;Sales&#8217; cannot be performed. Cannot compare data of types System.Byte and System.Object[]. Â Please check the data type returned by the Filter Expression.<br />
</address>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/preview-rushing-into-errors.jpg"><img class="alignnone size-full wp-image-27" title="preview-rushing-into-errors" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/preview-rushing-into-errors.jpg" alt="" width="480" height="220" /></a></p>
<p>10. Â You need to make one small change to the filter. Â Open the table properties again, but this time change the operator from equals (=) to IN. Â Since the Parameters!TerritoryID.Value now contains a comma separated list, we need to search IN instead of comparing.</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/table-properties-applying-multi-value-filter.jpg"><img class="alignnone size-full wp-image-32" title="table-properties-applying-multi-value-filter" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/table-properties-applying-multi-value-filter.jpg" alt="" width="448" height="432" /></a></p>
<p>11. Now, preview your report. Â The left image shows the initial preview, the right image shows the drop-down list blown out, you can see that Select All is selected by default.</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/preview-multi-value-select-all-filter-applied.jpg"><img class="alignnone size-medium wp-image-25" title="preview-multi-value-select-all-filter-applied" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/preview-multi-value-select-all-filter-applied-275x300.jpg" alt="" width="275" height="300" /></a><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/preview-multi-value-select-all-filter-selected-by-default.jpg"><img class="alignnone size-medium wp-image-26" title="preview-multi-value-select-all-filter-selected-by-default" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/preview-multi-value-select-all-filter-selected-by-default-279x300.jpg" alt="" width="279" height="300" /></a></p>
<p>One caveat is that performance is not going to be top notch because Reporting Services is filtering on the entire dataset every time. Â It would (most likely, depending on your implementation) be faster to filter in the dataset. Â However, this approach often requires a lot of development work on the T-SQL side to get it working. Â This approach is easy and quick enough for many applications. Â Enjoy.</p>
<p>Update: I found a good example of <a href="http://www.eggheadcafe.com/software/aspnet/31022159/ssrs-multivalue-paramete.aspx" target="_blank">the hard way to do multi-value parameters (by using SQL)</a>. Â If you scroll down to the second post, there is source code there for converting a delimited string into a table variable. Â I have re-formatted the <a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/charlist_to_table.sql">charlist_to_table source code</a> to make it more legible.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/09/25/easy-multi-value-parameters-in-sql-server-reporting-services/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>CAML queries, SSRS, and datetime fields</title>
		<link>http://www.duttonsoftware.com/2008/09/24/caml-queries-ssrs-and-datetime-fields/</link>
		<comments>http://www.duttonsoftware.com/2008/09/24/caml-queries-ssrs-and-datetime-fields/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 06:45:46 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[WSS 3.0]]></category>
		<category><![CDATA[CAML]]></category>
		<category><![CDATA[DateTime]]></category>
		<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=12</guid>
		<description><![CDATA[I&#8217;ve been using Enesys Software&#8217;s product RS Data Extension to query data out of SharePoint 2007 lists in SQL Server (2005) Reporting Services.  One quirk with the queries is that they use CAML and the dates must be in a particular format, ISO8601. I wanted users to use the standard date-picker, but there is no [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Enesys Software&#8217;s product <a title="RS Data Extension" href="http://www.enesyssoftware.com/Products/EnesysRSDataExtension/Overview/tabid/72/language/en-US/Default.aspx" target="_blank">RS Data Extension</a> to query data out of SharePoint 2007 lists in SQL Server (2005) Reporting Services.  One quirk with the queries is that they use CAML and the dates must be in a particular format, ISO8601.</p>
<p>I wanted users to use the standard date-picker, but there is no way to format the date inside the query.  My work-around is a classic Reporting Services pattern &#8211; create an internal parameter that does the formatting for you.  The format string for VBScript is &#8220;yyyy-MM-ddTHH:mm:ss&#8221;.</p>
<p>Below is a screenshot of the Report Parameters dialog. I used the following code to just grab today&#8217;s date (no time).</p>
<pre>     =CDate(CDate(Now()).ToString(<span style="color: #993300;">"MM/dd/yyyy"</span>))</pre>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-start-date.jpg"><img class="alignnone size-full wp-image-17" title="report-parameters-start-date" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-start-date.jpg" alt="" width="500" height="387" /></a></p>
<p>For the second parameter, I create an internal parameter that is dependent on the first.  This will prevent it from showing on the report and it will not be filled in until the start date is chosen.  Default value:</p>
<pre>     =CDate(Parameters!StartDate.Value).ToString(<span style="color: #993300;">"yyyy-MM-ddTHH:mm:ss"</span>)</pre>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-iso8601-start-date.jpg"><img class="alignnone size-full wp-image-15" title="report-parameters-iso8601-start-date" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-iso8601-start-date.jpg" alt="" width="500" height="387" /></a></p>
<p>I created a test report to show how this works.  Here is the report definition:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-definition.jpg"><img class="alignleft size-full wp-image-14" title="report-parameters-definition" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-definition.jpg" alt="" width="406" height="152" /></a></p>
<p>Below is the report preview:  You can now use the parameter in your CAML query.</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-preview.jpg"><img class="alignnone size-full wp-image-16" title="report-parameters-preview" src="http://www.duttonsoftware.com/wp-content/uploads/2008/09/report-parameters-preview.jpg" alt="" width="351" height="203" /></a></p>
<p>One other note on CAML date fields.  The time is ignored by default.  If you want to include the time, you must specify another attribute.  Example:</p>
<pre>&lt;Geq&gt;</pre>
<pre style="padding-left: 30px;">&lt;FieldRef Name="LastModified" /&gt;</pre>
<pre style="padding-left: 30px;">&lt;Value Type="DateTime" IncludeTimeValue="TRUE"&gt;@LastModified!&lt;/Value&gt;</pre>
<pre>&lt;/Geq&gt;</pre>
<p>I found a helpful post on <a title="CAML &amp; DateTime" href="http://abstractspaces.wordpress.com/2008/05/05/caml-datetime/" target="_blank">CAML &amp; DateTime</a> that might be useful for you too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/09/24/caml-queries-ssrs-and-datetime-fields/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SharePoint &#8220;User not found&#8221; error with Reporting Services in integrated mode</title>
		<link>http://www.duttonsoftware.com/2008/08/06/sharepoint-user-not-found-error-with-reporting-services-in-integrated-mode/</link>
		<comments>http://www.duttonsoftware.com/2008/08/06/sharepoint-user-not-found-error-with-reporting-services-in-integrated-mode/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 06:17:45 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[WSS 3.0]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/2008/08/06/sharepoint-user-not-found-error-with-reporting-services-in-integrated-mode/</guid>
		<description><![CDATA[I encountered an error the other day while trying to get a SharePoint 2007 (WSS 3.0) site running with SQL Server Reporting Services 2005 in integrated mode.  While trying to access any report .RDL files inside a document library, I got the &#8220;User not found&#8221; error from SharePoint.  After looking in the logs, I could [...]]]></description>
			<content:encoded><![CDATA[<p>I encountered an error the other day while trying to get a SharePoint 2007 (WSS 3.0) site running with SQL Server Reporting Services 2005 in integrated mode.  While trying to access any report .RDL files inside a document library, I got the &#8220;User not found&#8221; error from SharePoint.  After looking in the logs, I could not find anything.  What I did note, was that the development site worked, but the production site did not.</p>
<p>One difference between them &#8211; the names of the Application Pool that SharePoint was running under.  In development it was just &#8220;spsite&#8221; but in production it was &#8220;www.spsite.com&#8221;.</p>
<p>I renamed the application pool and *poof*, the site began to work.  I don&#8217;t understand the mechanism, but just thought I&#8217;d post in case someone else out there encounters it.</p>
<p>UPDATE: I&#8217;ve blogged about <a href="http://www.duttonsoftware.com/2008/10/30/more-on-sharepoint-user-not-found-error-with-reporting-services/">another reason why you might get the &#8220;User not found&#8221; error and possible solutions</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/08/06/sharepoint-user-not-found-error-with-reporting-services-in-integrated-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

