<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Use Stored Procedure Output Parameters in SSRS</title>
	<atom:link href="http://www.purplefrogsystems.com/blog/index.php/2008/08/use-stored-procedure-output-parameters-in-ssrs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.purplefrogsystems.com/blog/index.php/2008/08/use-stored-procedure-output-parameters-in-ssrs/</link>
	<description>Purple Frog-Blog for all that is Business Intelligence</description>
	<lastBuildDate>Thu, 09 Sep 2010 19:42:26 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Cool Paper Airplanes</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2008/08/use-stored-procedure-output-parameters-in-ssrs/comment-page-1/#comment-4645</link>
		<dc:creator>Cool Paper Airplanes</dc:creator>
		<pubDate>Fri, 08 Jan 2010 13:29:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=15#comment-4645</guid>
		<description>This is what I&#039;ve been looking for! Thank you so much for sharing this!</description>
		<content:encoded><![CDATA[<p>This is what I&#8217;ve been looking for! Thank you so much for sharing this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2008/08/use-stored-procedure-output-parameters-in-ssrs/comment-page-1/#comment-850</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Fri, 05 Dec 2008 10:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=15#comment-850</guid>
		<description>Thanks for your comment Drikus, and that&#039;s a very nice way of getting the info out.

The problem in most situations is that the return value from stored procs are status flags (did the proc work?, what state is the base data in, what kind of data is being returned etc. etc.), which is additional data, not derived from the dataset. Even in this situation though, the best solution is to edit the stored proc and append the value to the dataset as you&#039;ve pointed out. However in many situations the poor old report developer is not allowed to edit the source stored proc, so must find a workaround.

Like any workaround, there is always a hit somewhere, and you&#039;re right that temporary tables are best avoided if at all possible, not least as they are not supported very well in SSRS!.

And yes, I was using SQL 2005 - I should really make that clear in posts - point noted thanks!</description>
		<content:encoded><![CDATA[<p>Thanks for your comment Drikus, and that&#8217;s a very nice way of getting the info out.</p>
<p>The problem in most situations is that the return value from stored procs are status flags (did the proc work?, what state is the base data in, what kind of data is being returned etc. etc.), which is additional data, not derived from the dataset. Even in this situation though, the best solution is to edit the stored proc and append the value to the dataset as you&#8217;ve pointed out. However in many situations the poor old report developer is not allowed to edit the source stored proc, so must find a workaround.</p>
<p>Like any workaround, there is always a hit somewhere, and you&#8217;re right that temporary tables are best avoided if at all possible, not least as they are not supported very well in SSRS!.</p>
<p>And yes, I was using SQL 2005 &#8211; I should really make that clear in posts &#8211; point noted thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drikus.Roux</title>
		<link>http://www.purplefrogsystems.com/blog/index.php/2008/08/use-stored-procedure-output-parameters-in-ssrs/comment-page-1/#comment-849</link>
		<dc:creator>Drikus.Roux</dc:creator>
		<pubDate>Fri, 05 Dec 2008 09:35:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.purplefrogsystems.com/blog/?p=15#comment-849</guid>
		<description>Judging by the date of you post, you must be using SQL 2005 with SSRS 2005.

Not that I don&#039;t appreciate the gymnastics you have performed, but if your OUTPUT value can be derived from a sub-query, e.g. rowcount or applying an aggregate function, e.g. SUM() on your data, you could leverage something like:

CAST(COUNT(RecordID) OVER (PARTITION BY 1) AS VARCHAR(9)) AS [RecordCount] &lt;-- Partition by 1 to get a total number of records count value, which you could also have done with @@RowCount via OUTPUT param, which of course you can&#039;t use in SSRS.

Then you use the =First(Fields!Output.Value) as you suggested in the report.  At least you don&#039;t have to deal with temp tables, all that IO to tempdb and the administration of cleaning up afterwards.

Hope this is of some use!</description>
		<content:encoded><![CDATA[<p>Judging by the date of you post, you must be using SQL 2005 with SSRS 2005.</p>
<p>Not that I don&#8217;t appreciate the gymnastics you have performed, but if your OUTPUT value can be derived from a sub-query, e.g. rowcount or applying an aggregate function, e.g. SUM() on your data, you could leverage something like:</p>
<p>CAST(COUNT(RecordID) OVER (PARTITION BY 1) AS VARCHAR(9)) AS [RecordCount] &lt;&#8211; Partition by 1 to get a total number of records count value, which you could also have done with @@RowCount via OUTPUT param, which of course you can&#8217;t use in SSRS.</p>
<p>Then you use the =First(Fields!Output.Value) as you suggested in the report.  At least you don&#8217;t have to deal with temp tables, all that IO to tempdb and the administration of cleaning up afterwards.</p>
<p>Hope this is of some use!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
