<?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>Beakersoft Blog &#187; SQL Reporting Services</title>
	<atom:link href="http://www.beakersoft.co.uk/category/sql-reporting-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.beakersoft.co.uk</link>
	<description>My (mis)adventures in the IT industry</description>
	<lastBuildDate>Wed, 02 Nov 2011 00:15:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
  <link>http://www.beakersoft.co.uk</link>
  <url>http://www.beakersoft.co.uk/wordpress/wp-content/themes/Beakersoft/favicon.ico</url>
  <title>Beakersoft Blog</title>
</image>
	<atom:link rel='hub' href='http://www.beakersoft.co.uk/?pushpress=hub'/>
		<item>
		<title>Handling Deleted Users Who own SQL Reporting Subscription</title>
		<link>http://www.beakersoft.co.uk/2011/06/01/handling-deleted-users-who-own-sql-reporting-subscription/</link>
		<comments>http://www.beakersoft.co.uk/2011/06/01/handling-deleted-users-who-own-sql-reporting-subscription/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 16:47:12 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[SQL Reporting Services]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/?p=408</guid>
		<description><![CDATA[I&#8217;ve had an issue this week with some SQL reporting services subscriptions. A user contacted me saying her subscription reports were all failing. At first I assumed there was a problem with the user the report was running as, but it turned out to be something else. When I tried to change and save the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had an issue this week with some SQL reporting services subscriptions. A user contacted me saying her subscription reports were all failing. At first I assumed there was a problem with the user the report was running as, but it turned out to be something else.</p>
<p>When I tried to change and save the settings on one of the reports, I was presented with this error:</p>
<p><strong>The user or group name &#8216;Dom\User.Name&#8217; is not recognized. (rsUnknownUserName)</strong></p>
<p>Now, it turned out that the user that had originally create this report subscription had recently been deleted out of the active directory, and there was a lot of reports that this user had created. I had a poke around on the web interface and in the management tools, but i couldn&#8217;t see anywhere to change the owner of the subscription.</p>
<p>So, as i&#8217;ve had to do in the past I started having a look in the reporting service database. I looked first in the Subscriptions table, and there was an OwnerID field, when I linked this table back to the users table I found it was indeed linked to the old user that had been removed. So, I found a valid user in the table, and ran this SQL to update the Subscriptions table pointing to this user:</p>
<p><em>UPDATE dbo.Subscriptions SET OwnerID = &#8216;xxx-xxx-xxx-xxx-New-User&#8217; WHERE OwnerID = &#8216;xxx-xxx-xxx-xxx-Old-User&#8217;</em></p>
<p>When I opened up the subscription again, the owner was now valid, and I could save the report without the error message. I&#8217;m glad i did&#8217;nt have to go back to the user and tell them they needed to re-create all the subscriptions!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2011/06/01/handling-deleted-users-who-own-sql-reporting-subscription/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Show/Hide Groups at run time</title>
		<link>http://www.beakersoft.co.uk/2009/07/17/showhide-groups-at-run-time/</link>
		<comments>http://www.beakersoft.co.uk/2009/07/17/showhide-groups-at-run-time/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 18:32:15 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[SQL Reporting Services]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/?p=228</guid>
		<description><![CDATA[Recently quite a few of our users have been asking if they can show all of the report details at runtime, instead of having to drill down all the groups, opening and closing as they see fit. Well, the answer is yes, and its very easy to implement. Parameters are you friend The first thing [...]]]></description>
			<content:encoded><![CDATA[<p>Recently quite a few of our users have been asking if they can show all of the report details at runtime, instead of having to drill down all the groups, opening and closing as they see fit. Well, the answer is yes, and its very easy to implement.</p>
<h2><strong>Parameters are you friend</strong></h2>
<p>The first thing to do is create yourself a new parameter in the report, and call it something like <em>par_expand_groups</em>. Give it the following options:</p>
<p><img class="alignnone" title="param options" src="http://www.beakersoft.co.uk/img/ssrs_param_show_group1.jpg" alt="" width="456" height="435" /></p>
<p>Now, you need to make this parameter control weather or not the group is expanded as the report is ran, you do this by putting an expression into the <em>hidden </em>property of the row.</p>
<p>Normally if you have a group, when you run the report it will probably be hidden and the user has the option of showing the details, so the <em>hidden </em>property will be set to true. We are going to set it to the following expression:</p>
<p><em>=IIF(Parameters!par_expand_groups.Value = &#8220;True&#8221;, False, True)</em></p>
<p>This means that if the parameter is set to yes, the details will be shown, if its set to no they will remain hidden. Add this to each level of grouping on your report, and the user now has control over what they see</p>
<h2><strong>Slight Problem with the show/hide icons</strong></h2>
<p>Once you have added this to your report, you might notice a slight problem. If you run the report with the option of showing the group details, the little show/hide icon on the left used to toggle the details will be wrong. It will be showing the &#8216;+&#8217; even though the details are already showing, and if you press it to hide the details it will change to a &#8216;-&#8217;. They are the wrong way round!</p>
<p><img class="alignnone" title="Incorrect Icons" src="http://www.beakersoft.co.uk/img/report%5Ficons.gif" alt="" width="307" height="114" /></p>
<p>Obviously, this is going to confuse your users, and needs sorting. Well, thanks to a tip from <a href="http://www.lukehayler.com/2009/07/custom-visibility-toggling-in-ssrs">http://www.lukehayler.com/2009/07/custom-visibility-toggling-in-ssrs</a> its easy.</p>
<p>All you need to do is open up the properties of the text box that is the trigger for the show hide, and go into the <em>Visibility </em>tab. At the bottom is an <em> </em>option to set an expression for the toggle image. just enter:</p>
<p><em>=IIF(Parameters!par_expand_groups.Value = &#8220;True&#8221;, True, False)</em></p>
<p>As before, they is just looking at your parameter and setting the value of the toggle image. Now, when you run the report with the option to display the details, they icons for toggling the details should be correct.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2009/07/17/showhide-groups-at-run-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Report Services Printer Control Problem</title>
		<link>http://www.beakersoft.co.uk/2008/12/23/report-services-printer-control-problem/</link>
		<comments>http://www.beakersoft.co.uk/2008/12/23/report-services-printer-control-problem/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 20:38:28 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[SQL Reporting Services]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/?p=195</guid>
		<description><![CDATA[Not sure how many of you have hit this, but recently we have had a problem with users not being able to print out reports from the browser. When they hit the print icon after runnig a report, they are given the message &#8216;Cannot load client print control&#8217; Turns out that one of the patches [...]]]></description>
			<content:encoded><![CDATA[<p>Not sure how many of you have hit this, but recently we have had a problem with users not being able to print out reports from the browser. When they hit the print icon after runnig a report, they are given the message</p>
<p>&#8216;<em>Cannot load client print control&#8217;</em></p>
<p>Turns out that one of the patches Microsoft issue out (on a seemingly never ending basis) breaks(well, blocks) the activex. The patch in question is the ActiveX killbit one (i cant remember the kb number), there appears to be a problem with the old version of the print control activex, and when the latest patch is applied to the clients it stops the print control working.</p>
<p>The way to get it working again is basilcly to patch your reports server. This is something i am always a bit cautious of doing, as in the past i have had problems (service pack one removed the ability to do a multi select parameter) but this time i had a virtual server i could snapshot, patch then test.</p>
<p>To get it working again, i installed first of all SQL 2005 service pack 2 (<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=d07219b2-1e23-49c8-8f0c-63fa18f26d3a&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=d07219b2-1e23-49c8-8f0c-63fa18f26d3a&amp;displaylang=en</a>), then the latest hotfix rollup (<a href="http://support.microsoft.com/kb/956854">http://support.microsoft.com/kb/956854</a>). On a couple of the client machines this seemed to fix the problem without having to re-download the control, but on others we had to remove the control first, then re-install it and it worked a treat</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2008/12/23/report-services-printer-control-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting a Data Source at Runtime on SQL Reporting Services</title>
		<link>http://www.beakersoft.co.uk/2008/06/22/setting-a-data-source-at-runtime-on-sql-reporting-services/</link>
		<comments>http://www.beakersoft.co.uk/2008/06/22/setting-a-data-source-at-runtime-on-sql-reporting-services/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 14:23:16 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[SQL Reporting Services]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/?p=176</guid>
		<description><![CDATA[I am in the process of writing a reporting service that will be used across our whole company. The problem I have is there is not one central database all the reports will run of, each division has its own separate one. Lucky the database schema&#8217;s are consistent, but I needed a way of: a) [...]]]></description>
			<content:encoded><![CDATA[<p>I am in the process of writing a reporting service that will be used across our whole company. The problem I have is there is not one central database all the reports will run of, each division has its own separate one. Lucky the database schema&#8217;s are consistent, but I needed a way of:</p>
<p>a) setting the report data source at run time and<br />
b) letting the users control the database they want to connect to. Some high level user need to be able to access multiple databases, while others will just need access to their local one</p>
<p>So, here&#8217;s how I went about doing it.</p>
<h2>Setting Data source at Run time</h2>
<p>Normally, when you setup a reports data source in reporting services, you just point it to the database you want it to use (probably using a shared data source) give it some credentials and off you go. You would probably end up with a connection string looking something like this:</p>
<p><img style="vertical-align: middle;" src="http://www.beakersoft.co.uk/img/ds_normal.jpg" alt="Normal Data Source" width="471" height="408" /></p>
<p>Under normal circumstances that would work fine. But not this time. I need an easy way to replace the information held in the connection string with some sort of variable.</p>
<p>Turns out the easiest way to do it is by using a parameter in the connection string. You can create the connection string as an expression as if you were working with any other part of the report. However, before doing this you first need to create the parameters and fill them with some data.</p>
<h2>Data Source Table</h2>
<p>In the reports database, I created two new tables, one that will hold the name of the reports servers, database names and Active directory group with access to this data source. The other one will contain all the user names and what Database they are currently using. Download the SQL scrip to create the databases below</p>
<div class="download">
<div class="download-title">Download Table Creation Script</div>
<p>Download the script: <a title="Tables for Datasources" href="http://www.beakersoft.co.uk/wordpress/wp-content/create_tables.sql">create_tables.sql</a>
</div>
<p><font color="white">hello</font></p>
<div class="PostNote"><em>Note: You will need to put something in place (i use a webpage) to allow the users to control the content of these tables, this article only looks at the reporting services side of things.</em></div>
<p>Run this script on your reports sever database, and you will have two new tables, database_details and user_details. In order to do the tests you will need to create an entry in the database table (database_details) for your database, and an entry in the user table (user_details) for your username (include the domain name so it should read dom\joe.bloggs) and point it using the site_id filed to the database. You are now ready to create the SQL in the report that will populate the parameters</p>
<h2>Dataset Containing the database connection details</h2>
<p>Create yourself a test report, and in that report create a new dataset that points at your reports server database. The SQL needs to be the following:</p>
<p><em>SELECT     jp_user_details.username, jp_database_details.server_name, jp_database_details.database_name<br />
FROM         jp_user_details INNER JOIN<br />
jp_database_details ON jp_user_details.site_id = jp_database_details.site_id</em></p>
<p>This will return all the names in your database, what we need to do now is make sure at run time it only returns data for the user running the report. To do that we need to put a filter on the report. The filter will be:</p>
<p><em>Fields!username.value=User!UserID</em></p>
<p>and should look like this in your Dataset properties</p>
<p><img style="vertical-align: middle;" src="http://www.beakersoft.co.uk/img/ds_Filter.jpg" alt="Filter Propertiess" width="463" height="382" /></p>
<h2>The Parameters</h2>
<p>Once you have done this dataset, you need to create a couple of parameters. One will be for the server name, one for the database name. So go into your report parameters and create the following, with these options:</p>
<p><strong>Name</strong> &#8211; ServerName<br />
<strong>Datatype </strong>- String<br />
<strong>Hidden </strong>- Yes<br />
<strong>Available Values from Query</strong>: Select your dataset , then both values fields need to be server_name<br />
<strong>Default Values From Query</strong> &#8211; Select your dataset, value field is server_name</p>
<p><strong>Name</strong> &#8211; DatabaseName<br />
<strong>Datatype </strong>- String<br />
<strong>Hidden </strong>- Yes<br />
<strong>Available Values from Query</strong>: Select your dataset , then both values fields need to be database_name<br />
<strong>Default Values From Query</strong> &#8211; Select your dataset, value field is database_name</p>
<p>What does this do? Well, when you run your report now you will have the two parameters you have just created filled in with the server name and database name the person running the report wants to report on. The parameters are set to hidden so the user knows nothing about them.</p>
<h2>Final Step, create your dynamic dataset</h2>
<p>Now we have everything we need in place, the last step is to create a dataset that will look into the server held agaist the user, and retrive us the actul information we want. Create a new dataset, and in the connection string of this data source put the following:</p>
<p><em>= &#8220;data source=&#8221; &amp; Parameters!ServerName.Value &amp; &#8220;;initial catalog=&#8221; &amp;  Parameters!DatabaseName.Value</em></p>
<p>It should look like this in the window</p>
<p><img style="vertical-align: middle;" src="http://www.beakersoft.co.uk/img/ds_params.jpg" alt="dataset with Params" width="476" height="409" /></p>
<p>Now when you run the report, you data source will be based on the users choice held in the table</p>
<h2>A couple of things to note</h2>
<p>You will find it hard (probably impossable) to write the report with the parameterized data source. You&#8217;ll need to work with your local copy of the database hardcodded into the connection string first, then when you are happy with it change it to the parameter driven one. If you dont do this the report designer wont be able to read the dataset.</p>
<p>You also need to be carful the order in witch you put your user paramters on the report. I found that if i did&#8217;nt put data driven parameters (ie a list of sales areas the user can select) at the top of the list, they were greyed out when you tried to run the report. Not sure why, but i asume its down the the order the datasets are exceuted in</p>
<p>If you have any problems with this, or have any different ways of doing it let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2008/06/22/setting-a-data-source-at-runtime-on-sql-reporting-services/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Reporting Services Quick Hints</title>
		<link>http://www.beakersoft.co.uk/2008/05/01/reporting-services-quick-hints/</link>
		<comments>http://www.beakersoft.co.uk/2008/05/01/reporting-services-quick-hints/#comments</comments>
		<pubDate>Thu, 01 May 2008 20:35:52 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[SQL Reporting Services]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/?p=172</guid>
		<description><![CDATA[I&#8217;ve been doing a bit of tweaking on a SQL Reporting Services install this week, trying to get it to run a bit better, get better logs out of it and generally try and improve its performance. So, what did I do? Reports Timing out &#8211; This is a pain. I have a couple of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a bit of tweaking on a SQL Reporting Services install this week, trying to get it to run a bit better, get better logs out of it and generally try and improve its performance. So, what did I do?</p>
<p><strong>Reports Timing out</strong> &#8211; This is a pain. I have a couple of reports that people run huge queries for, and sometimes the reports can time out while running. This was a fairly easy fix, just locate your <em>rsreportserver.config </em>file (mine was in (Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer). Open it up and alter the key:</p>
<p><em>DatabaseQueryTimeout</em>- This is the amount of time the reports server will wait until it thinks the query to the server has timed out. You can set it to 0 (zero) for no timeout, but this is probably not a good idea. There is another key in there I thought might also help called <em>SQLCommandTimeoutSeconds</em> but according to the MS docs this is not used (so why the hell is it in there?)</p>
<p><strong>Better Client Side Errors &#8211; </strong>Fault finding errors in the report viewer can be a bit painful, but you can enable remote errors to help you out a bit.<br />
There  is a table in the reports server database called <em>ConfigurationInfo</em>. In here there is a <em>EnableRemoteErrors</em> property. If you set this to <em>true </em>and restart the reporting service clients will get better errors, helping you try and work out what is actually happening.</p>
<p>My next step with errors is to try and handle them properly in the reports. There is a <em>ReportError</em> event witch I think will do the trick. When I have worked out the best way to use it i will post about it here</p>
<p><strong>Logs</strong> &#8211; As well as writing to the application event log, reporting services also write more detailed information into its own log files. These (along with crash dump files) can be found in C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\LogFiles.</p>
<p>Using all this info I now find it easier to troubleshoot and tweek my environment. If anyone else has any handy hints let me know and ill add them to this post!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2008/05/01/reporting-services-quick-hints/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Showing Reporting Services Multi-Value Parameters</title>
		<link>http://www.beakersoft.co.uk/2008/01/23/showing-reporting-services-multi-value-parameters/</link>
		<comments>http://www.beakersoft.co.uk/2008/01/23/showing-reporting-services-multi-value-parameters/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 20:55:04 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[SQL Reporting Services]]></category>
		<category><![CDATA[Reporting Services]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/2008/01/23/showing-reporting-services-multi-value-parameters/</guid>
		<description><![CDATA[One of the big advantages SQL reporting services 2005 has over 2000 is the ability to use Muil-Value parameters (I cant really believe it was missing from 2000) The only problem with them is showing the values of the parameters you have selected on the report, or showing and &#8216;ALL&#8217; value if the user has [...]]]></description>
			<content:encoded><![CDATA[<p> <img src="http://www.beakersoft.co.uk/img/rpt_param_header.png" alt="Param Header" align="middle" height="50" width="450" /></p>
<p>One of the big advantages SQL reporting services 2005 has over 2000 is the ability to use Muil-Value parameters (I cant really believe it was missing from 2000)</p>
<p>The only problem with them is showing the values of the parameters you have selected on the report, or showing and &#8216;ALL&#8217; value if the user has selected all available ones. This is a walk through of how to do it, although I&#8217;m sure there is a better way out there.</p>
<p>First of all were are going to assume you have a big lift of parameters (say 20+), if you selected them all then you would get a huge ugly list where you show them on the report probably looking something like this:</p>
<p><img src="http://www.beakersoft.co.uk/img/reports_params_ex1.jpg" alt="Lots of Params" align="middle" height="33" width="579" /></p>
<p>Now, this does not look very nice on the report, will probably make the report go onto 2 pages when it would fit on one etc. What we want to do in this situation is just output the word &#8216;ALL&#8217;. In order to do this you need to create a new dataset based on the number of possible values in the parameter, and add some logic to the text box that displays the values</p>
<h2>Creating the data source</h2>
<p>First of all create a new dataset and call it <em>data_param_count  </em>or similar. Then copy the sql from what you use to get your parameter option, and instead of selecting all the fields use a SQL <em>select count</em> query to just return the number of rows, eg:</p>
<p><em>Select Count (*) from tbl_params</em></p>
<div class="PostNote"> <em>Note: If you are hard coding in your parameter values you cant do this step. You will just have to hard code the number of parameters into the next section</em></div>
<p>This should return you just one row from your table that contains the number of parameters that you can select. We can then use this in our text box to find out the number of parameters we are dealing with.</p>
<h2>Displaying the parameter Value</h2>
<p>Now that you know how many parameters you are dealing with, you are ready to output them. Drop an text box onto your report, at the top of the body section (you cant drop it into the header as when the header is rendered the data sources have not yet ran). Right click on the new text box and select <em>Expression</em> to open up the expression editor.</p>
<p>You now need to tell the text box to display the contents of the parameter, something if there are too many to display (such as &#8216;Cannot display all&#8217;) and something for if they are all selected (such as &#8216;ALL&#8217;). In order to do this you need to use a couple of functions built into reporting services <a href="en.wikipedia.org/wiki/IIf" title="IIF Wikipedia">IIF</a> and Join, these will allow us to check the number of parameters and output what we want. Here&#8217;s a code example:</p>
<p><em>= &#8220;Param: &#8221; &amp; IIF(Sum(Fields!ID.Value, &#8220;</em><em>data_param_count&#8221;) = Parameters!par_List.Count,&#8221;All&#8221;,Join(Parameters!par_List.Value, &#8220;,&#8221;)) </em></p>
<div class="PostNote"><em>Note: If you have hard codded the parameters into the list, replace the section of code using the data list with your own number.</em></div>
<p>So, what&#8217;s happening in this line of code?</p>
<ul>
<li> First of all we use an IIF to see if the overall number of parameters available to select is equal to the number the user has chosen. We can get how many have been selected using the <em>count </em>property of the parameter object</li>
<li>Next if the part of the IIF that will run if the statement is true. So here if the count of selected params is the same as the number available we output the string &#8216;ALL&#8217;</li>
<li>The final part is what happens if the statement is not true. We use the <em>Join</em> function to output a list of all the parameters the user has selected, separated by a comma. Now instead of a long list if you select all the available values, you will get this:</li>
</ul>
<p><img src="http://www.beakersoft.co.uk/img/reports_params_ex2.jpg" alt="Example after codding" align="middle" height="24" width="373" /></p>
<p>That&#8217;s far neater than just outputting a long list. If you wanted to show something else in a case where lots of values(but not all) have been selected,  you could just add another IIF statement into the above in the place of the false string that could check for something like more than 10, and display &#8216;To many to Display&#8217; or something similar.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2008/01/23/showing-reporting-services-multi-value-parameters/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Working with images in Reporting Services</title>
		<link>http://www.beakersoft.co.uk/2007/12/24/working-with-images-in-reporting-services/</link>
		<comments>http://www.beakersoft.co.uk/2007/12/24/working-with-images-in-reporting-services/#comments</comments>
		<pubDate>Mon, 24 Dec 2007 13:17:31 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[SQL Reporting Services]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[programing]]></category>
		<category><![CDATA[Reports]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/2007/12/24/working-with-images-in-reporting-services/</guid>
		<description><![CDATA[Images. They can make your reports look great, but sometimes they are a bit tricky to show where you want, and when you want. Even something as simple as showing an image or not, or showing a different image based on the condition of some data. Well, it might not be rocket science (or rocket [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.beakersoft.co.uk/img/images_reports_header.png" alt="Images in reports header" width="450" height="50" align="middle" /></p>
<p>Images. They can make your reports look great, but sometimes they are a bit tricky to show where you want, and when you want. Even something as simple as showing an image or not, or showing a different image based on the condition of some data.</p>
<p>Well, it might not be rocket science (or rocket engineering)  but its not exactly well documented, so here are a couple of real world examples of how to handle images in your reports.</p>
<h2>Showing/Hiding Images</h2>
<p>First of all this is how to show or hide an image in a table, based on the condition of filed in your data set. This could be used to indicate (for instance) if an order is stopped. The first thing to do is add an image holder into your table. When you drag the image holder onto the cell of the table the image wizard will open. Follow the Wizard through and embed the image in your report. When its done you will see the image in the table cell.</p>
<p>Now, on the properties of the cell, drop down the <em>Visible -&gt; Hidden</em> property, and click in <em>Expression</em> in the list, this will open up the expression editor. In here we are going to use an <a title="IIF Statment Wikipedia" href="http://en.wikipedia.org/wiki/IIf" target="_blank">IIF </a>statement to check the condition of one of our fields. We can then set the <em>Visible </em>state to <em>true </em>or <em>false </em>depending on the outcome. The statement will look something like:</p>
<p><em>=iif(Fields!Stop_Stat.Value = &#8220;Stop&#8221;, False, True) </em></p>
<p>With this now in place, when you run the report it should now only show the image when the value of Stop_Stat is true.</p>
<h2><span id="more-95"></span>Changing the Image</h2>
<p>The will be some circumstances where you want to show a different image depending on the value of a variable. This is done in a similar way to hiding the image, but instead you <em>Data</em> value of the image source.</p>
<p>The first thing to do is insert the images you need onto the report. Drop an image control onto your table where you want it to apear, and embed the image into the report. Then drop another image control on the report, maybe in the header or somewhere out of the way. Embed the image again and this time set this controls <em>Visible </em>property to false. Now you have both the images you need in the report.</p>
<p>At this point make a note of the names of both of the images embedded in the report. They tend to be the name of the file you used without the extension.</p>
<p>Now, go into the property&#8217;s of the image control in the table, under <em>Data -&gt; Value </em>drop down to <em>Expression</em> to open up the expression editor. Here we are going to use an IIF statement on a filed, and tell it to use one image if the condition is true, or a different one if it was false:</p>
<p><em>=iif(Fields!Stop_date.Value is nothing, &#8220;advert_incomplete_1&#8243;, &#8220;stop&#8221;)</em></p>
<p>When you save it you wont see the image in the box any more,  it should have changed to this</p>
<p><img src="http://www.beakersoft.co.uk/img/image_expresion.gif" alt="Image with expresion" align="middle" /></p>
<p>Now, when you run the report, the images should swap round depending on what the value of your filed is, so you will end up with something like</p>
<p><img src="http://www.beakersoft.co.uk/img/image_expresion_example.gif" alt="image expresion example" align="middle" /></p>
<p>Hopefully, you should now be able to make better use of images in your reports now, making them a bit better to look at and by using visual pointers instead of plain old text.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2007/12/24/working-with-images-in-reporting-services/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Error trying to edit Reporting Subscription</title>
		<link>http://www.beakersoft.co.uk/2007/12/16/error-trying-to-edit-reporting-subscription/</link>
		<comments>http://www.beakersoft.co.uk/2007/12/16/error-trying-to-edit-reporting-subscription/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 16:42:29 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[SQL Reporting Services]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Reports]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/2007/12/16/error-trying-to-edit-reporting-subscription/</guid>
		<description><![CDATA[Over the weekend we did a big upgrade, part of witch meant all the reports had to be recreated to work with the new database schema, so I told people they would have to setup any subscriptions again. First of all I think the being able to create subscriptions is a great idea. The only [...]]]></description>
			<content:encoded><![CDATA[<p>Over the weekend we did a big upgrade, part of witch meant all the reports had to be recreated to work with the new database schema, so I told people they would have to setup any subscriptions again.</p>
<p>First of all I think the being able to create subscriptions is a great idea. The only downside to it is having to specify a username/password to run as (i&#8217;m not sure how you could get round this though apart from running all the subscription reports as a specific user), and the fact that it has no built in print functionally.</p>
<p>To get round the lack of printing, we use a product call batch print pro, available from  <a href="http://traction-software.co.uk/">traction-software.co.uk</a>. It is a fantastic piece of software that you point at a directory, and it monitors in there for PDF files and sends them to a printer you specify as they drop in. The setup of it is sometimes a bit odd but it worked well.</p>
<p>Anyway, a user created her subscriptions again but could not edit them once they changed, she kept getting an error when hitting save:</p>
<p><em>An internal error occurred on the report server. See the error log for more details. (rsInternalError)<br />
The EXECUTE permission was denied on the object &#8216;sp_add_category&#8217;, database &#8216;msdb&#8217;, schema &#8216;dbo&#8217;.</em></p>
<p>For some reason, when I looked on the reports server config, the <em>windows service identity </em>section was in an error state. I just put the username and password back in, and it worked again. I didn&#8217;t even have to restart reporting services</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2007/12/16/error-trying-to-edit-reporting-subscription/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error trying to edit Reporting Subscription</title>
		<link>http://www.beakersoft.co.uk/2007/12/13/error-trying-to-edit-reporting-subscription-2/</link>
		<comments>http://www.beakersoft.co.uk/2007/12/13/error-trying-to-edit-reporting-subscription-2/#comments</comments>
		<pubDate>Thu, 13 Dec 2007 17:17:00 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[SQL Reporting Services]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/2007/12/13/error-trying-to-edit-reporting-subscription-2/</guid>
		<description><![CDATA[Over the weekend we did a big upgrade, part of witch meant all the reports had to be recreated to work with the new database schema, so I told people they would have to setup any subscriptions again. First of all I think the being able to create subscriptions is a great idea. The only [...]]]></description>
			<content:encoded><![CDATA[<p>Over the weekend we did a big upgrade, part of witch meant all the reports had to be recreated to work with the new database schema, so I told people they would have to setup any subscriptions again.</p>
<p>First of all I think the being able to create subscriptions is a great idea. The only downside to it is having to specify a username/password to run as (i&#8217;m not sure how you could get round this though apart from running all the subscription reports as a specific user), and the fact that it has no built in print functionally.</p>
<p>To get round the lack of printing, we use a product call batch print pro, available from  <a href="http://traction-software.co.uk/">traction-software.co.uk</a>. It is a fantastic piece of software that you point at  a directory, and it monitors in there for PDF files and sends them to a printer you specify as they drop in. The setup of it is sometimes a bit odd but it worked well.</p>
<p>Anyway, a user created her subscriptions again but could not edit them once they changed, she kept getting an error when hitting save:</p>
<p><span style="font-style: italic;">An internal error occurred on the report server. See the error log for more  details. (rsInternalError) </span><a style="font-style: italic;" href="http://go.microsoft.com/fwlink/?LinkId=20476&amp;EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&amp;EvtID=rsInternalError&amp;ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&amp;ProdVer=9.00.3054.00"><u><span style="color:#0000ff;">Get Online Help</span></u></a><br />
<table style="font-style: italic;" class="msrs-normal" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td valign="top" width="25"></td>
<td class="msrs-normal" colspan="2" valign="top">The EXECUTE permission was denied on  the object &#8216;sp_add_category&#8217;, database &#8216;msdb&#8217;, schema &#8216;dbo&#8217;.</td>
</tr>
</tbody>
</table>
<p>For some reason, when I looked on the reports server config, the <i>windows service identity </i>section was in an error state. I just put the username and password back in, and it worked again. I didn&#8217;t even have to restart reporting services</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2007/12/13/error-trying-to-edit-reporting-subscription-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exporting SQL Services reports to Excel</title>
		<link>http://www.beakersoft.co.uk/2007/08/17/exporting-sql-services-reports-to-excel/</link>
		<comments>http://www.beakersoft.co.uk/2007/08/17/exporting-sql-services-reports-to-excel/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 23:25:00 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[SQL Reporting Services]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/2007/08/17/exporting-sql-services-reports-to-excel/</guid>
		<description><![CDATA[Just a quick blog about something i&#8217;ve noticed over the last couple of weeks. Have you ever tried exporting your reports to Excel spreadsheets, and got unpredictable results? You know what its like, most accounts type people insist on working Excel (even though you could just change the report to suit them), but sometimes when [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick blog about something i&#8217;ve noticed over the last couple of weeks. Have you ever tried exporting your reports to Excel spreadsheets, and got unpredictable results?</p>
<p>You know what its like, most accounts type people insist on working Excel (even though you could just change the report to suit them), but sometimes when you export the report to excel extra columns appear. Then, you can export the same report again and the extra columns you had before will no longer be there. The problem accounts people have with the extra columns is it stuffs up any sorting they want to do, and any macros they have written that depend on specific data being in specific places.</p>
<p>The best way to get round this seams to be to remove all the dynamic text boxes etc from the headers and footers of the report. I think what must happen is if the info in the headers doesn&#8217;t align exactly with the tables in the main  section of the report, it throws off the export.</p>
<p>I&#8217;ve now got two copies of the reports that the accounts people tend to use, one with the headers and footers still in, and one they can use to export into excel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2007/08/17/exporting-sql-services-reports-to-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

