<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://richmondsql.org/cs2007/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 'Reporting Services'</title><link>http://richmondsql.org/cs2007/search/SearchResults.aspx?o=DateDescending&amp;tag=Reporting+Services&amp;orTags=0</link><description>Search results matching tag 'Reporting Services'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Custom Code for DateTime comparison In SQL Reporting Services 2005</title><link>http://richmondsql.org/cs2007/forums/p/104/137.aspx#137</link><pubDate>Wed, 16 Sep 2009 19:32:08 GMT</pubDate><guid isPermaLink="false">2e8a3759-4cfd-4c9f-8103-2483fc393c1e:137</guid><dc:creator>NinjaDragonfly</dc:creator><description>&lt;p&gt;Hello Folks!&lt;/p&gt;
&lt;p&gt;For the first time I need to create a bit of custom code for a report and can not quiet get&amp;nbsp;it all toghether, so I am asking the&amp;nbsp;folks smarter then me, i.e. you.&lt;/p&gt;
&lt;p&gt;I have need to compare the system datetime to an existing datetime (time_due)&amp;nbsp;in a table I am using for a report to tell if the&amp;nbsp;&amp;quot;time_due&amp;quot; is &amp;quot;overdue&amp;quot;. I do have a dataset&amp;nbsp;that gives me the system datetime, apparently the simplest part of the task. But as to the correct custom code I&amp;#39;m lost. I have queried online for guidence but haven&amp;#39;t quiet found something that works, and so confusing myself.&lt;/p&gt;
&lt;p&gt;Any suggestions and guidence will be greatly appriciated!!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Karen (aka NinjaDragonfly)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Reporting Services User Defined Ad Hoc Reports</title><link>http://richmondsql.org/cs2007/forums/p/94/128.aspx#128</link><pubDate>Tue, 19 May 2009 01:45:30 GMT</pubDate><guid isPermaLink="false">2e8a3759-4cfd-4c9f-8103-2483fc393c1e:128</guid><dc:creator>geoff5</dc:creator><description>I just joined this community moments ago, but I have some experience with Reporting Services, and I&amp;#39;ve done several with user-supplied parameters like you are trying to do.

It is quite easy to add a parameter to the Data Source query. All you have to do is add a T-SQL variable to the query statement, generally in the WHERE clause. SSRS will recognize that it needs a value to fill the parameter, and it will generate a prompt at the top of the report output page to capture the user input. It defaults to a data type of text generally, but you can further define what data type you want, and you can even provide a default value. All you have to do is go to the Report &amp;gt; Report Parameters menu option while you are on the Layout tab.

For example you could have as part of your query: WHERE [table].YearColumn = @ReportYear

Then using the Report Parameters option you can define Year as an integer value and even define the default value of @ReportYear as year(getdate()) to always default to the current year.

This is the easiest way to define parameters.

Hope this helps,

Geoff</description></item></channel></rss>