<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'SSRS'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=SSRS&amp;orTags=0</link><description>Search results matching tag 'SSRS'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>SSIS Reporting Pack – a performance tip</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2012/11/05/ssis-reporting-pack-a-performance-tip.aspx</link><pubDate>Mon, 05 Nov 2012 22:36:41 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45948</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;SSIS Reporting Pack is a suite of open source SQL Server Reporting Services (SSRS) reports that provide additional insight into the SQL Server Integration Services (SSIS) 2012 Catalog. You can read more about SSIS Reporting Pack &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSIS+Reporting+Pack/default.aspx" target="_blank"&gt;here on my blog&lt;/a&gt; or had over to the home page for the project at &lt;a title="http://ssisreportingpack.codeplex.com/" href="http://ssisreportingpack.codeplex.com/"&gt;http://ssisreportingpack.codeplex.com/&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;After having used SSRS Reporting Pack on a real project for a few months now I have come to realise that if you have any sizeable data volumes in [SSISDB] then the reports in SSIS Reporting Pack will suffer from chronic performance problems – I have seen the “execution” report take upwards of 30minutes to return data. To combat this I highly recommend that you create an index on the &lt;font face="Consolas"&gt;[SSISDB].[internal].[event_messages].[operation_id]&lt;/font&gt; &amp;amp; &lt;font face="Consolas"&gt;[SSISDB].[internal].[operation_messages].[operation_id]&lt;/font&gt; fields. &lt;a href="http://www.ssistalk.com/"&gt;Phil Brammer&lt;/a&gt; has experienced similar problems himself and has since made it easy for the rest of us by preparing some scripts to create the indexes that he recommends and he has shared those scripts via his blog at &lt;a href="http://www.ssistalk.com/SSIS_2012_Missing_Indexes.zip"&gt;http://www.ssistalk.com/SSIS_2012_Missing_Indexes.zip&lt;/a&gt;. If you are using SSIS Reporting Pack, or even if you are simply querying [SSISDB], I highly recommend that you download Phil’s scripts and test them out on your own SSIS Catalog(s).&lt;/p&gt;  &lt;p&gt;Those indexes will not solve all problems but they will make some of your reports run quicker. I am working on some further enhancements that should further improve the performance of the reports. Watch this space.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Multi-State Maps in Reporting Services</title><link>http://sqlblog.com/blogs/stacia_misner/archive/2011/03/24/34379.aspx</link><pubDate>Thu, 24 Mar 2011 13:33:17 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:34379</guid><dc:creator>smisner</dc:creator><description>&lt;p&gt;In SQL Server 2008 R2 Reporting Services, you can now create maps for reports using the built-in map gallery of the United States or individual states, ESRI shapefiles, or a spatial query. In a &lt;a title="SQL Server 2008 R2 Reporting Services – The World is But a Stage (T-SQL Tuesday #006)" href="http://blog.datainspirations.com/2010/05/11/sql-server-2008-r2-reporting-services-the-word-is-but-a-stage-t-sql-tuesday-006/" target="_blank"&gt;previous post&lt;/a&gt;, I explained how to obtain an ESRI shapefile for another country and convert it into spatial data so that you can have other maps available in the map gallery. In this post, I'll show you how to create one map from multiple ESRI shapefiles. Whether you add it to the map gallery or not is up to you!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Obtaining State Shapefiles&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To start, the process is similar to the one I described in my previous post on working with spatial data. This time my goal is to create a map of two states - Nevada and California. The best place to download free shapefiles for US states is the &lt;a href="http://www.census.gov/geo/www/tiger/tgrshp2010/tgrshp2010.html" target="_blank"&gt;U.S. Census Bureau&lt;/a&gt; where I used the link to download by state. I found the Nevada directory and then used the topmost directory 32 where there many files to download. I chose tl_2010_32_state00.zip. Similarly in the California directory, I used the topmost directory to find and download tl_2010_06_state00.zip.&amp;#160; Then I extracted each zip file to its own directory on my computer. They each contain a variety of files, including SHP and DBF files that I could use for a map using the ESRI shapefile data source option if I want to create a separate map for each state. But I want to combine these maps, so my mission is not yet complete.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Converting Shapefiles to SQL Spatial Data&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;My next step is to use a tool called &lt;a href="http://www.sharpgis.net/page/SQL-Server-2008-Spatial-Tools.aspx" target="_blank"&gt;Shape2SQL&lt;/a&gt; to extract the spatial data from the shapefile into a SQL Server table. Pinal Dave (&lt;a href="http://blog.sqlauthority.com/" target="_blank"&gt;blog&lt;/a&gt;|&lt;a href="http://twitter.com/PinalDave" target="_blank"&gt;twitter&lt;/a&gt;) has a &lt;a title="SQL SERVER – World Shapefile Download and Upload to Database – Spatial Database" href="http://blog.sqlauthority.com/2010/03/30/sql-server-world-shapefile-download-and-upload-to-database-spatial-database/" target="_blank"&gt;tutorial &lt;/a&gt;explaining how to do that. I had the same experience that I described in my last post - I had to clear the Create Spatial Index checkbox to get the table to load properly for the first state. When I loaded the second state, I had to clear the Replace Existing Table checkbox. Now I have both states in a table called State, as shown below, with a geom column having the SQL Geometry data type.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.datainspirations.com/wp-content/uploads/2011/03/StateTable.jpg"&gt;&lt;img class="alignnone size-full wp-image-390" title="StateTable" alt="" src="http://blog.datainspirations.com/wp-content/uploads/2011/03/StateTable.jpg" width="623" height="27" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Creating the Multi-State Map&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now that I have my spatial data in a table, I'm ready to create the map. In Business Intelligence Development Studio, I added the map to my report which launched the Map Wizard and then I used the following steps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;On the &lt;strong&gt;Choose a source of spatial data&lt;/strong&gt; page of the wizard, select &lt;strong&gt;SQL Server spatial query&lt;/strong&gt;, and click &lt;strong&gt;Next&lt;/strong&gt;. &lt;/li&gt;    &lt;li&gt;On the &lt;strong&gt;Choose a dataset with SQL Server spatial data&lt;/strong&gt; page, select &lt;strong&gt;Add a new dataset with SQL Server spatial data&lt;/strong&gt;. &lt;/li&gt;    &lt;li&gt;On the &lt;strong&gt;Choose a connection to a SQL Server spatial data source&lt;/strong&gt; page, select &lt;strong&gt;New&lt;/strong&gt;. &lt;/li&gt;    &lt;li&gt;In the &lt;strong&gt;Data Source Properties&lt;/strong&gt; dialog box, on the &lt;strong&gt;General&lt;/strong&gt; page, add a connecton string like this (changing your server name if necessary):       &lt;br /&gt;&lt;code&gt;Data Source=(local);Initial Catalog=SpatialData&lt;/code&gt; &lt;/li&gt;    &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; and then click &lt;strong&gt;Next&lt;/strong&gt;. &lt;/li&gt;    &lt;li&gt;On the &lt;strong&gt;Design a query&lt;/strong&gt; page, add a query for the country shape, like this:       &lt;br /&gt;&lt;code&gt;SELECT&amp;#160; NAME00, geom FROM State&lt;/code&gt; &lt;/li&gt;    &lt;li&gt;Click &lt;strong&gt;Next&lt;/strong&gt;. The map wizard reads the spatial data and renders it for you on the &lt;strong&gt;Choose spatial data and map view options&lt;/strong&gt; page, as shown below. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://blog.datainspirations.com/wp-content/uploads/2011/03/NevadaCalifornia.jpg"&gt;&lt;img class="alignnone size-full wp-image-391" title="NevadaCalifornia" alt="" src="http://blog.datainspirations.com/wp-content/uploads/2011/03/NevadaCalifornia.jpg" width="594" height="338" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Of course, you can use these technique with any shapefiles that you can locate. It's not limited to the United States. For example, if you want to create a map of multiple European countries or a combination of states in India, you could use a similar process by downloading shapefiles from either the &lt;a href="http://www.gadm.org/country" target="_blank"&gt;Global Administrative Areas spatial database&lt;/a&gt; or the &lt;a href="http://www.naturalearthdata.com/downloads/" target="_blank"&gt;Natural Earth database&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>The Case of the Extra Page: Rendering Reporting Services as PDF</title><link>http://sqlblog.com/blogs/stacia_misner/archive/2011/03/18/34259.aspx</link><pubDate>Fri, 18 Mar 2011 18:49:47 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:34259</guid><dc:creator>smisner</dc:creator><description>&lt;p&gt;I had to troubleshoot a problem with a mysterious extra page appearing in a PDF this week. My first thought was that it was likely to caused by one of the most common problems that people encounter when developing reports that eventually get rendered as PDF is getting blank pages inserted into the PDF document. The cause of the blank pages is usually related to sizing. You can learn more at &lt;a href="http://msdn.microsoft.com/en-us/library/bb677374.aspx" target="_blank"&gt;Understanding Pagination in Reporting Services&lt;/a&gt; in Books Online.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.datainspirations.com/wp-content/uploads/2011/03/PageSize.jpg"&gt;&lt;img class="alignnone size-full wp-image-378" title="PageSize" alt="" src="http://blog.datainspirations.com/wp-content/uploads/2011/03/PageSize.jpg" width="571" height="352" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When designing a report, you have to be really careful with the layout of items in the body. As you move items around, the body will expand to accommodate the space you're using and you might eventually tighten everything back up again, but the body doesn't automatically collapse. One of my favorite things to do in Reporting Services 2005 - which I dubbed the &amp;quot;vacu-pack&amp;quot; method - was to just erase the size property of the Body and let it auto-calculate the new size, squeezing out all the extra space. Alas, that method no longer works beginning with Reporting Services 2008. Even when you make sure the body size is as small as possible (with no unnecessary extra space along the top, bottom, left, or right side of the body), it's important to calculate the body size plus header plus footer plus the margins and ensure that the calculated height and width do not exceed the report's height and width (shown as the page in the illustration above). This won't matter if users always render reports online, but they'll get extra pages in a PDF document if the report's height and width are smaller than the calculate space.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Beginning the Investigation&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In the situation that I was troubleshooting, I checked the properties:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;strong&gt;Item&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Property&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Body&lt;/td&gt;        &lt;td&gt;Height&lt;/td&gt;        &lt;td&gt;6.25in&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;Width&lt;/td&gt;        &lt;td&gt;10.5in&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Page Header&lt;/td&gt;        &lt;td&gt;Height&lt;/td&gt;        &lt;td&gt;1in&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Page Footer&lt;/td&gt;        &lt;td&gt;Height&lt;/td&gt;        &lt;td&gt;0.25in&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Report&lt;/td&gt;        &lt;td&gt;Left Margin&lt;/td&gt;        &lt;td&gt;0.1in&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;Right Margin&lt;/td&gt;        &lt;td&gt;0.1in&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;Top Margin&lt;/td&gt;        &lt;td&gt;0.05in&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;Bottom Margin&lt;/td&gt;        &lt;td&gt;0.05in&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;Page Size - Height&lt;/td&gt;        &lt;td&gt;8.5in&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;Page Size - Width&lt;/td&gt;        &lt;td&gt;11in&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;So I calculated the total width using Body Width + Left Margin + Right Margin and came up with a value of 10.7 inches. And then I calculated the total height using Body Height + Page Header Height + Page Footer Height + Top Margin + Bottom Margin and got 7.6 inches. Well, page sizing couldn't be the reason for the extra page in my report because 10.7 inches is smaller than the report's width of 11 inches and 7.6 inches is smaller than the report's height of 8.5 inches. I had to look elsewhere to find the culprit.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Conducting the Third Degree&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;My next thought was to focus on the rendering size of the items in the report. I've adapted my problem to use the Adventure Works database. At the top of the report are two charts, and then below each chart is a rectangle that contains a table.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.datainspirations.com/wp-content/uploads/2011/03/DashboardPreview.jpg"&gt;&lt;img style="border-bottom:black 1px solid;border-left:black 1px solid;border-top:black 1px solid;border-right:black 1px solid;" class="alignnone size-full wp-image-380" title="DashboardPreview" alt="" src="http://blog.datainspirations.com/wp-content/uploads/2011/03/DashboardPreview.jpg" width="530" height="430" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the real-life scenario, there were some graphics present as a background for the tables which fit within the rectangles that were about 3 inches high so the visual space of the rectangles matched the visual space of the charts - also about 3 inches high. But there was also a huge amount of white space at the bottom of the page, and as I mentioned at the beginning of this post, a second page which was blank except for the footer that appeared at the bottom. Placing a textbox beneath the rectangles to see if they would appear on the first page resulted the textbox's appearance on the second page. For some reason, the rectangles wanted a buffer zone beneath them. What's going on?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Taking the Suspect into Custody&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;My next step was to see what was really going on with the rectangle. The graphic appeared to be correctly sized, but the behavior in the report indicated the rectangle was growing. So I added a border to the rectangle to see what it was doing.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.datainspirations.com/wp-content/uploads/2011/03/RectanglesPreview.jpg"&gt;&lt;img class="alignnone size-full wp-image-381" title="RectanglesPreview" alt="" src="http://blog.datainspirations.com/wp-content/uploads/2011/03/RectanglesPreview.jpg" width="611" height="226" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When I added borders, I could see that the size of each rectangle was growing to accommodate the table it contains. The rectangle on the right is slightly larger than the one on the left because the table on the right contains an extra row. The rectangle is trying to preserve the whitespace that appears in the layout, as shown below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.datainspirations.com/wp-content/uploads/2011/03/Whitespace.jpg"&gt;&lt;img class="alignnone size-full wp-image-382" title="Whitespace" alt="" src="http://blog.datainspirations.com/wp-content/uploads/2011/03/Whitespace.jpg" width="500" height="292" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Closing the Case&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now that I knew what the problem was, what could I do about it? Because of the graphic in the rectangle (not shown), I couldn't eliminate the use of the rectangles and just show the tables. But fortunately, there is a report property that comes to the rescue: ConsumeContainerWhitespace (accessible only in the Properties window). I set the value of this property to True. Problem solved. Now the rectangles remain fixed at the configured size and don't grow vertically to preserve the whitespace. Case closed.&lt;/p&gt;</description></item><item><title>Applying Interactive Sorting to Multiple Columns in Reporting Services</title><link>http://sqlblog.com/blogs/stacia_misner/archive/2011/03/16/34197.aspx</link><pubDate>Wed, 16 Mar 2011 18:06:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:34197</guid><dc:creator>smisner</dc:creator><description>&lt;p&gt;A nice feature that appeared first in SQL Server 2005 (not SQL Server 2008 - I mis-remembered!) is the ability to allow the user to click a column header to sort that column. It defaults to an ascending sort first, but you can click the column again to switch to a descending sort. You can learn more about interactive sorts in general at the &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/cc627536.aspx"&gt;Adding Interactive Sort to a Data Region&lt;/a&gt; in Books Online. Not mentioned in the article is how to apply interactive sorting to multiple columns, hence the reason for this post!&lt;/p&gt;  &lt;p&gt;Let’s say that I have a simple table like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.datainspirations.com/wp-content/uploads/2011/03/ReportToSort.png"&gt;&lt;img class="size-full wp-image-371 alignnone" title="ReportToSort" alt="" width="359" height="81" src="http://blog.datainspirations.com/wp-content/uploads/2011/03/ReportToSort.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To enable interactive sorting, I open the Text Box properties for each of the column headers – the ones in the top row. Here’s an example of how I set up basic interactive sorting:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.datainspirations.com/wp-content/uploads/2011/03/TextBoxProperties.png"&gt;&lt;img class="alignnone size-full wp-image-372" title="TextBoxProperties" alt="" width="577" height="521" src="http://blog.datainspirations.com/wp-content/uploads/2011/03/TextBoxProperties.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now when I preview the report, I see icons appear in each text box on the header row to indicate that interactive sorting is enabled. The initial sort order that displays when you preview the report depends on how you design the report. In this case, the report sorts by Sales Territory Group first, and then by Calendar Year.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.datainspirations.com/wp-content/uploads/2011/03/InteractiveSortReport.png"&gt;&lt;img class="alignnone size-full wp-image-373" title="InteractiveSortReport" alt="" width="366" height="290" src="http://blog.datainspirations.com/wp-content/uploads/2011/03/InteractiveSortReport.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Interactive sorting overrides the report design. So let’s say that I want to sort first by Calendar Year, and then by Sales Territory Group. To do this, I click the arrow to the right of Calendar Year, and then, while pressing the Shift key, I click the arrow to the right of Sales Territory Group twice (once for ascending order and then a second time for descending order). Now my report looks like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.datainspirations.com/wp-content/uploads/2011/03/MultiSort.png"&gt;&lt;img class="alignnone size-full wp-image-374" title="MultiSort" alt="" width="363" height="288" src="http://blog.datainspirations.com/wp-content/uploads/2011/03/MultiSort.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This technique only seems to work when you have a minimum of three columns configured with interactive sorting. If I remove the property from one of the columns in the above example, and try to use the interactive sorting on the remaining two columns, I can sort only the first column. The sort on the second column gets ignored. I don’t know if that’s by design or a bug, but I do know that’s what I’m experiencing when I try it out!&lt;/p&gt;</description></item><item><title>Working with Reporting Services Filters–Part 5: OR Logic</title><link>http://sqlblog.com/blogs/stacia_misner/archive/2011/02/04/33208.aspx</link><pubDate>Fri, 04 Feb 2011 17:26:43 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:33208</guid><dc:creator>smisner</dc:creator><description>&lt;p&gt;When you combine multiple filters, Reporting Services uses AND logic. Once upon a time, there was actually a drop-down list for selecting AND or OR between filters which was very confusing to people because often it was grayed out. Now that selection is gone, but no matter. It wouldn’t help us solve the problem that I want to describe today. &lt;/p&gt;  &lt;p&gt;As with many problems, Reporting Services gives us more than one way to apply OR logic in a filter. If I want a filter to include this value OR that value for the same field, one approach is to set up the filter is to use the IN operator as I explained in &lt;a href="http://blog.datainspirations.com/2010/12/21/working-with-reporting-services-filterspart-1/" target="_blank"&gt;Part 1 of this series&lt;/a&gt;. But what if I want to base the filter on two different fields? I&amp;#160; need a different solution.&lt;/p&gt;  &lt;p&gt;Using the AdventureWorksDW2008R2 database, I have a report that lists product sales:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/stacia_misner/SNAGHTML139a4b29_60CBEC55.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTML139a4b29" border="0" alt="SNAGHTML139a4b29" src="http://sqlblog.com/blogs/stacia_misner/SNAGHTML139a4b29_thumb_0C9C4045.png" width="603" height="481" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Let’s say that I want to filter this report to show only products that are Bikes (a category) OR products for which sales were greater than $1,000 in a year. &lt;/p&gt;  &lt;p&gt;If I set up the filter like this:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;strong&gt;Expression&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Data Type&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Operator&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;[Category]&lt;/td&gt;        &lt;td&gt;Text&lt;/td&gt;        &lt;td&gt;=&lt;/td&gt;        &lt;td&gt;Bikes&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;[SalesAmount]&lt;/td&gt;        &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;&amp;gt;&lt;/td&gt;        &lt;td&gt;1000&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;Then AND logic is used which means that both conditions must be true. That’s not the result I want.&lt;/p&gt;  &lt;p&gt;Instead, I need to set up the filter like this:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;strong&gt;Expression&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Data Type&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Operator&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;=Fields!EnglishProductCategoryName.Value = &amp;quot;Bikes&amp;quot; OR Fields!SalesAmount.Value &amp;gt; 1000&lt;/td&gt;        &lt;td&gt;Boolean&lt;/td&gt;        &lt;td&gt;=&lt;/td&gt;        &lt;td&gt;=True&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;The OR logic needs to be part of the expression so that it can return a Boolean value that we test against the Value. Notice that I have used =True rather than True for the value. The filtered report appears below. Any non-bike product appears only if the total sales exceed $1,000, whereas Bikes appear regardless of sales. (You can’t see it in this screenshot, but Mountain-400-W Silver, 38 has sales of $923 in 2007 but gets included because it is in the Bikes category.) &lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/stacia_misner/SNAGHTML13b7749a_39B12D13.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTML13b7749a" border="0" alt="SNAGHTML13b7749a" src="http://sqlblog.com/blogs/stacia_misner/SNAGHTML13b7749a_thumb_5CFE21B8.png" width="631" height="504" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>The Case of the Missing Date/Time Stamp: Reporting Services 2008 R2 Snapshots</title><link>http://sqlblog.com/blogs/stacia_misner/archive/2011/01/25/32919.aspx</link><pubDate>Tue, 25 Jan 2011 23:14:46 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:32919</guid><dc:creator>smisner</dc:creator><description>&lt;p&gt;This week I stumbled upon an undocumented “feature” in SQL Server 2008 R2 Reporting Services as I was preparing a demonstration on how to set up and use report snapshots. If you’re familiar with the main changes in this latest release of Reporting Services, you probably already know that Report Manager got a facelift this time around. Although this facelift was generally a good thing, one of the casualties – in my opinion – is the loss of the snapshot label that served two purposes… First, it flagged the report as a snapshot. Second, it let you know when that snapshot was created.&lt;/p&gt;  &lt;p&gt;As part of my standard operating procedure when demonstrating report snapshots, I point out this label, so I was rather taken aback when I didn’t see it in the demonstration I was preparing. It sort of upset my routine, and I’m rather partial to my routines. I thought perhaps I wasn’t looking in the right place and changed Report Manager from Tile View to Detail View, but no – that label was still missing. In the grand scheme of life, it’s not an earth-shattering change, but you’ll have to look at the Modified Date in Details View to know when the snapshot was run. Or hope that the report developer included a textbox to show the execution time in the report. (Hint: this is a good time to add this to your list of report development best practices, whether a report gets set up as a report snapshot or not!) &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A snapshot from the past&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In case you don’t remember how a snapshot appeared in Report Manager back in the old days (of SQL Server 2008 and earlier), here’s an image I snagged from my &lt;a href="http://www.amazon.com/Microsoft-Server-2008-Reporting-Services/dp/0735626472/ref=sr_1_1?ie=UTF8&amp;amp;qid=1295996994&amp;amp;sr=8-1" target="_blank"&gt;Reporting Services 2008 Step by Step&lt;/a&gt; manuscript:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/stacia_misner/clip_image001_6CF6AB94.gif"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="clip_image001" border="0" alt="clip_image001" src="http://sqlblog.com/blogs/stacia_misner/clip_image001_thumb_656B3C27.gif" width="244" height="52" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A snapshot in the present&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A report server running in SharePoint integrated mode had no such label. There you had to rely on the Report Modified date-time stamp to know the snapshot execution time. So I guess all platforms are now consistent. &lt;/p&gt;  &lt;p&gt;Here’s a screenshot of Report Manager in the 2008 R2 version. One of these is a snapshot and the rest execute on demand. Can you tell which is the snapshot?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/stacia_misner/image_7DFAD977.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/stacia_misner/image_thumb_0441B006.png" width="475" height="208" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Consider descriptions as an alternative&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;So my report snapshot demonstration has one less step, and I’ll need to edit the Denali version of the Step by Step book. Things are simpler this way, but I sure wish we had an easier way to identify the execution methods of the reports. Consider using the description field to alert users that the report is a snapshot. It might save you a few questions about why the data isn’t up-to-date if the users know that something changed in the source of the report. Notice that the full description doesn’t display in Tile View, so keep it short and sweet or instruct users to open Details View to see the entire description.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/stacia_misner/image_557BF763.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/stacia_misner/image_thumb_70B45064.png" width="474" height="206" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Working with Reporting Services Filters - Part 4: Creating a NOT IN Filter</title><link>http://sqlblog.com/blogs/stacia_misner/archive/2011/01/20/32793.aspx</link><pubDate>Thu, 20 Jan 2011 18:38:59 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:32793</guid><dc:creator>smisner</dc:creator><description>&lt;p&gt;A question came in from a reader asking about how to create a NOT IN filter. You can see in the &lt;a href="http://blog.datainspirations.com/2010/12/21/working-with-reporting-services-filterspart-1/" target="_blank"&gt;first of this series of blog posts about Reporting Services filters&lt;/a&gt;, NOT IN is not available in our list of operators for filters. However, it's still possible to produce a filter that excludes items in the list. The technique is not particularly intuitive, which is why I've added this filter type to my series on filters. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Preparing the Report&lt;/strong&gt;     &lt;br /&gt;    &lt;br /&gt;Let's start with a simple scenario using the &lt;a href="http://msftdbprodsamples.codeplex.com/releases/view/55926" target="_blank"&gt;AdventureWorksDW2008R2 database&lt;/a&gt;. I set up a query that returns reseller sales by category. In my report, I have two tables: one for Bikes and Components, and the other for everything else. I want to create a filter for the first table using the IN operator, but I'll have to create an expression for the second table to achieve the NOT IN effect.     &lt;br /&gt;    &lt;br /&gt;To hold the list of values for my IN filter, I create a hidden report parameter with multi-values, without available values, and with a list of default values that includes Bikes and Components, like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/stacia_misner/image_190482BD.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/stacia_misner/image_thumb_46196F8B.png" width="390" height="319" /&gt;&lt;/a&gt;&amp;#160; &lt;a href="http://sqlblog.com/blogs/stacia_misner/image_506A93EB.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/stacia_misner/image_thumb_3DB59A34.png" width="390" height="319" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Of course, I don't need to manually populate the default values. I could use a query instead, but I think you get the idea.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Using the IN Operator&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This step is not really required to set up the NOT IN filter, but I have included it as another example of working with the IN operator to supplement my first post in this series. In my report, I want the first table to include the values that are defined in the parameter, so I add a filter to the tablix like this:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;b&gt;Expression&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Data Type&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Operator&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;[Category]&lt;/td&gt;        &lt;td&gt;Text&lt;/td&gt;        &lt;td&gt;In&lt;/td&gt;        &lt;td&gt;=Parameters!FilterList.Value&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can also use [@FilterList] as the value if you want to type in a simple expression into the Value field. If you use the Expression Editor to set up the Value expression, and double-click on FilterList in the Parameters category, be sure to remove the &lt;strong&gt;(0)&lt;/strong&gt; from the end of the expression so that the IN operator is comparing Category to all values in the parameter array, not just the first value. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Creating a NOT IN Filter&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;For the second table, I also add a filter, but I set it up differently. There is no such thing as a NOT IN operator, so I need to get creative. I need to come up with an expression that evaluates as True or False, and then set that up as my Value in the filter definition. Then I’ll set the Expression of the filter to True and use an = operator. The filter will keep rows where Value is True and exclude rows which cause Value to be False.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;b&gt;Expression&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Data Type&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Operator&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;=True&lt;/td&gt;        &lt;td&gt;Boolean&lt;/td&gt;        &lt;td&gt;=&lt;/td&gt;        &lt;td&gt;=Iif(InStr(Join(Parameters!FilterList.Value,&amp;quot;,&amp;quot;),          &lt;br /&gt;Fields!Category.Value)=0,True,False)&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For Expression, note that I have =True and not just True. This is important because True by itself will be interpreted as a string instead of a Boolean data type. &lt;/p&gt;  &lt;p&gt;I use the InStr function in the value to compare the current row’s Category to the FilterList which I convert from an array to a comma-delimited string by using the Join function. The InStr function returns 0 if the category is not found, which is the equivalent of NOT IN. Thus, I have the expression return a True – which keeps the row in the second table. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Checking the Results&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Here’s the final report:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/stacia_misner/image_5CF84107.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/stacia_misner/image_thumb_23753110.png" width="518" height="100" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you’d like to have a look at how I set this up, you can &lt;a href="http://blog.datainspirations.com/uploads/in-vs-not-in.zip" target="_blank"&gt;download the RDL&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Have you found another way to solve NOT IN? Let me know!&lt;/p&gt;</description></item><item><title>Working with Reporting Services Filters – Part 3: The TOP and BOTTOM Operators</title><link>http://sqlblog.com/blogs/stacia_misner/archive/2011/01/07/32422.aspx</link><pubDate>Fri, 07 Jan 2011 23:07:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:32422</guid><dc:creator>smisner</dc:creator><description>&lt;p&gt;Thus far in this series, I have described using the &lt;a target="_blank" href="http://blog.datainspirations.com/2010/12/21/working-with-reporting-services-filterspart-1/"&gt;IN operator&lt;/a&gt; and the &lt;a target="_blank" href="http://blog.datainspirations.com/2010/12/30/working-with-reporting-services-filters-part-2-the-like-operator/"&gt;LIKE operator&lt;/a&gt;. Today, I’ll continue the series by reviewing the TOP and BOTTOM operators.&lt;/p&gt;  &lt;p&gt;Today, I happened to be working on an example of using the TOP N operator and was not successful on my first try because the behavior is just a bit different than we find when using an “equals” comparison as I described in &lt;a target="_blank" href="http://blog.datainspirations.com/2010/12/21/working-with-reporting-services-filterspart-1/"&gt;my first post in this series&lt;/a&gt;. In my example, I wanted to display a list of the top 5 resellers in the United States for AdventureWorks, but I wanted it based on a filter. I started with a hard-coded filter like this:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;b&gt;Expression&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Data Type&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Operator&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;[ResellerSalesAmount]&lt;/td&gt;        &lt;td&gt;Float&lt;/td&gt;        &lt;td&gt;Top N&lt;/td&gt;        &lt;td&gt;5&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;And received the following error:&lt;/p&gt;  &lt;p&gt;&lt;font color="#a5a5a5"&gt;A filter value in the filter for tablix 'Tablix1' specifies a data type that is not supported by the 'TopN' operator. Verify that the data type for each filter value is Integer.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Well, that puzzled me. Did I really have to convert ResellerSalesAmount to an integer to use the Top N operator? &lt;/p&gt;  &lt;p&gt;Just for kicks, I switched to the Top % operator like this:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;b&gt;Expression&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Data Type&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Operator&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;[ResellerSalesAmount]&lt;/td&gt;        &lt;td&gt;Float&lt;/td&gt;        &lt;td&gt;Top %&lt;/td&gt;        &lt;td&gt;50&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;This time, I got exactly the results I expected – I had a total of 10 records in my dataset results, so 50% of that should yield 5 rows in my tablix. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/stacia_misner/image_26A4BE96.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" width="390" height="129" src="http://sqlblog.com/blogs/stacia_misner/image_thumb_21C20ADA.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So thinking about the problem with Top N some&amp;nbsp; more, I switched the Value to an expression, like this:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;b&gt;Expression&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Data Type&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Operator&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;[ResellerSalesAmount]&lt;/td&gt;        &lt;td&gt;Float&lt;/td&gt;        &lt;td&gt;Top N&lt;/td&gt;        &lt;td&gt;=5&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;And it worked! &lt;/p&gt;  &lt;p&gt;So the value for Top N or Top % must reflect a number to plug into the calculation, such as Top 5 or Top 50%, and the expression is the basis for determining what’s in that group. In other words, Reporting Services will sort the rows by the expression – ResellerSalesAmount in this case – in descending order, and then filter out everything except the topmost rows based on the operator you specify. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/stacia_misner/image_652A0C3C.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" width="488" height="198" src="http://sqlblog.com/blogs/stacia_misner/image_thumb_6B70E2CA.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The curious thing is that, if you’re going to hard-code the value, you must enter the value for Top N with an equal sign in front of the integer, but you can omit the equal sign when entering a hard-coded value for Top %. This experience is why working with Reporting Services filters is not always intuitive!&lt;/p&gt;  &lt;p&gt;When you use a report parameter to set the value, you won’t have this problem. Just be sure that the data type of the report parameter is set to Integer. Jessica Moss has an example of using a Top N filter in a tablix which you can view &lt;a target="_blank" href="http://jessicammoss.blogspot.com/2008/08/display-top-n-rows.html"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Working with Bottom N and Bottom % works similarly. You just provide a number for N or for the percentage and Reporting Services works from the bottom up to determine which rows are kept and which are excluded. &lt;/p&gt;</description></item><item><title>Working with Reporting Services Filters – Part 2: The LIKE Operator</title><link>http://sqlblog.com/blogs/stacia_misner/archive/2010/12/30/32158.aspx</link><pubDate>Thu, 30 Dec 2010 18:06:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:32158</guid><dc:creator>smisner</dc:creator><description>&lt;p&gt;In the &lt;a target="_blank" href="http://blog.datainspirations.com/2010/12/21/working-with-reporting-services-filterspart-1/"&gt;first post of this series&lt;/a&gt;, I introduced the use of filters within the report rather than in the query. I included a list of filter operators, and then focused on the use of the IN operator. As I mentioned in the previous post, the use of some of these operators is not obvious, so I'm going to spend some time explaining them as well as describing ways that you can use report filters in Reporting Services in this series of blog posts.     &lt;br&gt;    &lt;br&gt;Now let's look at the LIKE operator. If you write T-SQL queries, you've undoubtedly used the &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms179859.aspx"&gt;LIKE operator&lt;/a&gt; to produce a query using the % symbol as a wildcard for multiple characters like this:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;select * from DimProduct where EnglishProductName like &lt;font color="#ff0000"&gt;'%Silver%'&lt;/font&gt;&lt;/font&gt;     &lt;br&gt;    &lt;br&gt;&lt;a href="http://sqlblog.com/blogs/stacia_misner/SNAGHTML91bd74b_1A596D14.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTML91bd74b" border="0" alt="SNAGHTML91bd74b" width="570" height="228" src="http://sqlblog.com/blogs/stacia_misner/SNAGHTML91bd74b_thumb_11F597BD.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And you know that you can use the _ symbol as a wildcard for a single character like this:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;select * from DimProduct      &lt;br&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;where EnglishProductName like &lt;font color="#ff0000"&gt;'_L Mountain Frame - Black, 4_'        &lt;br&gt;&lt;/font&gt;&lt;/font&gt;    &lt;br&gt;&amp;nbsp;&lt;a href="http://sqlblog.com/blogs/stacia_misner/SNAGHTML92af546_69E2E89D.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTML92af546" border="0" alt="SNAGHTML92af546" width="578" height="155" src="http://sqlblog.com/blogs/stacia_misner/SNAGHTML92af546_thumb_690A82B3.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So when you encounter the LIKE operator in a Reporting Services filter, you probably expect it to work the same way. But it doesn't. You use the * symbol as a wildcard for multiple characters as shown here:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;b&gt;Expression&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Data Type&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Operator&lt;/b&gt;&lt;/td&gt;        &lt;td&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;[EnglishProductName]&lt;/td&gt;        &lt;td&gt;Text&lt;/td&gt;        &lt;td&gt;Like&lt;/td&gt;        &lt;td&gt;*Silver*&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;Note that you don’t have to include quotes around the string that you use for comparison.&lt;/p&gt;  &lt;p&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/cc627464.aspx"&gt;Books Online has an example&lt;/a&gt; of using the % symbol as a wildcard for a single character, but I have not been able to successfully use this wildcard. If anyone has a working example, I’d love to see it!&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;UPDATE: Thanks to loyal reader Pravin, I can confirm that the ? character is the wildcard for the single character.&lt;/span&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Uninstalling Reporting Server 2008 on Windows Server 2008</title><link>http://sqlblog.com/blogs/piotr_rodak/archive/2010/12/22/uninstalling-reporting-server-2008-on-windows-server-2008.aspx</link><pubDate>Thu, 23 Dec 2010 00:03:18 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:31909</guid><dc:creator>rodak.p@gmail.com</dc:creator><description>&lt;p&gt;Ha. I had quite disputable pleasure of installing and reinstalling and reinstalling and reinstalling – I think about 5 times before it worked – Reporting Server 2008 on Windows Server with the same year number in name. &lt;/p&gt;  &lt;p&gt;During my struggle I came across an error which seems to be not quite unfamiliar to some more unfortunate developers and admins who happen to uninstall SSRS 2008 from the server. I had the SSRS 2008 installed as named instance, &lt;strong&gt;SQL2008&lt;/strong&gt;. I wanted to uninstall the server and install it to default instance. And this is when it bit me – not the first time and not the last that day &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://sqlblog.com/blogs/piotr_rodak/wlEmoticon-smile_2FA89F51.png" /&gt;. The setup complained that it couldn’t access a DLL:&lt;/p&gt;    &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:4a1cd680-0f0b-4d78-a2dd-cf4755a047e1" class="wlWriterEditableSmartContent"&gt;&lt;pre style="width:950px;height:324px;background-color:White;overflow:auto;"&gt;&lt;div&gt;&lt;span style="color:#000000;"&gt;Error message:

TITLE: Microsoft SQL Server &lt;/span&gt;&lt;span style="color:#000000;"&gt;2008&lt;/span&gt;&lt;span style="color:#000000;"&gt; Setup

&lt;/span&gt;&lt;span style="color:#000000;"&gt;------------------------------&lt;/span&gt;&lt;span style="color:#000000;"&gt;

The following error has occurred:

Access to the path &lt;/span&gt;&lt;span style="color:#000000;"&gt;'&lt;/span&gt;&lt;span style="color:#000000;"&gt;C:\Windows\SysWOW64\perf-ReportServer$SQL2008-rsctr.dll&lt;/span&gt;&lt;span style="color:#000000;"&gt;'&lt;/span&gt;&lt;span style="color:#000000;"&gt; is denied.

For help, click: http:&lt;/span&gt;&lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;span style="color:#008000;"&gt;go.microsoft.com/fwlink?LinkID=20476&amp;amp;ProdName=Microsoft+SQL+Server&amp;amp;EvtSrc=setup.rll&amp;amp;EvtID=50000&amp;amp;ProdVer=10.0.1600.22&amp;amp;EvtType=0x60797DC7%25400x84E8D3C0&lt;/span&gt;&lt;span style="color:#008000;"&gt;
&lt;/span&gt;&lt;span style="color:#000000;"&gt;
&lt;/span&gt;&lt;span style="color:#000000;"&gt;------------------------------&lt;/span&gt;&lt;span style="color:#000000;"&gt;

BUTTONS:

OK&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This is a screenshot that shows the above error:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://public.bay.livefilestore.com/y1pCN0negrAA7ln4AX9SQex7E9FLqCpuysstBd-mHMAaMTxUskqK3-xkXdGjdqzoJ-B32ldY9TqcTjadtaozaLAZA/ScreenShot021.jpg?psid=1" /&gt;&lt;/p&gt;

&lt;p&gt;This issue seems to have a bit of literature dedicated to it and even seemingly a KB article &lt;a title="http://support.microsoft.com/kb/956173" href="http://support.microsoft.com/kb/956173"&gt;http://support.microsoft.com/kb/956173&lt;/a&gt; and a similar Connect item: &lt;a title="http://connect.microsoft.com/SQLServer/feedback/details/363653/error-messages-when-upgrading-from-sql-2008-rc0-to-rtm" href="http://connect.microsoft.com/SQLServer/feedback/details/363653/error-messages-when-upgrading-from-sql-2008-rc0-to-rtm"&gt;http://connect.microsoft.com/SQLServer/feedback/details/363653/error-messages-when-upgrading-from-sql-2008-rc0-to-rtm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The article describes issue as following:&lt;/p&gt;

&lt;p&gt;When you try to uninstall Microsoft SQL Server 2008 Reporting Services from the server, you may receive the following error message: &lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;An error has occurred: 
    &lt;br /&gt;Access to the path 'Drive_Letter:\WINDOWS\system32\perf-ReportServer-rsctr.dll' is denied. &lt;/p&gt;

  &lt;p&gt;&lt;b&gt;Note &lt;/b&gt;Drive_Letter refers to the disc drive into which the SQL Server installation media is inserted.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In my case, the &lt;strong&gt;Note&lt;/strong&gt; was not true; the error pointed to a dll that was located in Windows folder on C:\, not where the installation media were. &lt;/p&gt;

&lt;p&gt;&lt;img src="http://public.bay.livefilestore.com/y1pCN0negrAA7l3qBM1o2I8RtA3GEKcGYJRI0aDbmnL0SmFNJXNdG9_MWDeSZralYa6m_KDdImUOe0pdMrOWqhgEQ/ScreenShot022.jpg?psid=1" /&gt;&lt;/p&gt;

&lt;p&gt;Despite this difference I tried to identify any processes that might be keeping lock on the dll. I downloaded Sysinternals &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896653"&gt;process explorer&lt;/a&gt; and ran it to find any processes I could stop. Unfortunately, there was no such process.&lt;/p&gt;

&lt;p&gt;I tried to rerun the installation, but it failed at the same step.&lt;/p&gt;

&lt;p&gt;Eventually I decided to remove the dll before the setup was executed. I changed name of the dll to be able to restore it in case of some issues. Interestingly, Windows let me do it, which means that indeed, it was not locked by any process.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://public.bay.livefilestore.com/y1pRWEBMCwSUz24Phn7VhqsDoAumxEb8vENzx0_OXTBsPuoWkrAh_gLWmOR8QTgQwfJ8vzdGIGXtPjWzCTFLavN8A/ScreenShot024.jpg?psid=1" /&gt;&lt;/p&gt;

&lt;p&gt;I ran the setup and this time it uninstalled the instance without any problems:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://public.bay.livefilestore.com/y1pCN0negrAA7nby79V4ZYIHWkUALMPnDEHk_baD2CRXOzvUwaAPo7wDcaCqbRoOS66mK1PATt8pFjNZVY_gKuywA/ScreenShot023.jpg?psid=1" /&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;To summarize my experience I should say – be &lt;strong&gt;very&lt;/strong&gt; careful, don’t leave any leftovers after uninstallation – remove/rename any folders that are left after setup has finished. For some reason, setup doesn’t remove folders and certain files. Installation on Windows Server 2008 requires more attention than on Windows 2003 because of the changed security model, some actions can be executed only by administrator in elevated execution mode. In general, you have to get used to &lt;a href="http://en.wikipedia.org/wiki/User_Account_Control"&gt;UAC&lt;/a&gt; and a bit different experience than with Windows Server 2003.&lt;/p&gt;

&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5ecca658-04dd-491c-97b9-7b7e7def3df9" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server+2008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Windows+Server+2008" rel="tag"&gt;Windows Server 2008&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SRS" rel="tag"&gt;SRS&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Reporting+Services" rel="tag"&gt;Reporting Services&lt;/a&gt;&lt;/div&gt;</description></item></channel></rss>