<?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>Joel Lipman .Com - Wordpress Demo Site</title>
	<atom:link href="http://demo.joellipman.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://demo.joellipman.com/wordpress</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Mon, 03 Oct 2011 13:13:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Just Testing</title>
		<link>http://demo.joellipman.com/wordpress/?p=9</link>
		<comments>http://demo.joellipman.com/wordpress/?p=9#comments</comments>
		<pubDate>Tue, 16 Aug 2011 16:17:46 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://demo.joellipman.com/wordpress/?p=9</guid>
		<description><![CDATA[Testing a new post yayayay]]></description>
			<content:encoded><![CDATA[<p>Testing a new post yayayay</p>
]]></content:encoded>
			<wfw:commentRss>http://demo.joellipman.com/wordpress/?feed=rss2&#038;p=9</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Increase Recent Documents Number in Windows XP</title>
		<link>http://demo.joellipman.com/wordpress/?p=520</link>
		<comments>http://demo.joellipman.com/wordpress/?p=520#comments</comments>
		<pubDate>Thu, 28 Jul 2011 08:52:07 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Test Category 1]]></category>
		<category><![CDATA[Test Category 2]]></category>

		<guid isPermaLink="false">http://demo.joellipman.com/wordpress/?p=520</guid>
		<description><![CDATA[Just a quick note here. This is an article based on the REG file from Kelly&#8217;s Korner (@www.kellys-korner-xp.com/xp_tweaks.htm). I&#8217;m not fond of downloading REG files and running them even if I have checked what it&#8217;s doing. I&#8217;m putting a note here just for me: Start &#62; Run &#62; Regedit &#62; OK Browse to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer Create [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note here. This is an article based on the REG file from Kelly&#8217;s Korner (@<a href="http://www.kellys-korner-xp.com/xp_tweaks.htm" target="external">www.kellys-korner-xp.com/xp_tweaks.htm</a>). I&#8217;m not fond of downloading REG files and running them even if I have checked what it&#8217;s doing. I&#8217;m putting a note here just for me:</p>
<ol>
<li>Start &gt; Run &gt; Regedit &gt; OK</li>
<li>Browse to <strong><em>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer</em></strong></li>
<li>Create New <strong>DWORD Value</strong></li>
<li>Name it &#8220;<strong>MaxRecentDocs</strong>&#8220;</li>
<li>Double-click on the new DWORD</li>
<li>Set value data to &#8220;<strong>19</strong>&#8221; ( equals 25 )</li>
<li>Leave Base as &#8220;<strong>Hexadecimal</strong>&#8220;</li>
<li><strong>OK</strong></li>
<li>Restart your computer</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://demo.joellipman.com/wordpress/?feed=rss2&#038;p=520</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outlook Calendar in Reporting Services</title>
		<link>http://demo.joellipman.com/wordpress/?p=493</link>
		<comments>http://demo.joellipman.com/wordpress/?p=493#comments</comments>
		<pubDate>Wed, 20 Apr 2011 09:24:12 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Test Category 1]]></category>

		<guid isPermaLink="false">http://demo.joellipman.com/wordpress/?p=493</guid>
		<description><![CDATA[Do not follow the below: In the middle of doing My Setup: SQL Server v2008 / v2008 R2 Report Builder 2.0+ or Business Intelligence Development Studio (BIDS) v2008 DB User who can create functions on a database. Introduction This has to be the 3rd article on creating a calendar in SQL Server Reporting Services on [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: red; font-weight: bold;">Do not follow the below: In the middle of doing</span></p>
<p><strong>My Setup:</strong></p>
<ul>
<li>SQL Server v2008 / v2008 R2</li>
<li>Report Builder 2.0+ or Business Intelligence Development Studio (BIDS) v2008</li>
<li>DB User who can create functions on a database.</li>
</ul>
<p><strong>Introduction</strong><br />
This has to be the 3rd article on creating a calendar in SQL Server Reporting Services on this website. These should be:</p>
<ul>
<li><a href="/articles/microsoft/reporting-services/478-room-availability-calendar-in-business-intelligence-development-studio.html">Room Availability Calendar</a></li>
<li><a href="/articles/microsoft/reporting-services/466-sql-calendar-in-business-intelligence-development-studio.html">SQL Calendar using Business Intelligence Development Studio (BIDS)</a></li>
</ul>
<p><strong>Another one?</strong><br />
The above 2 articles relate to examples that I did using what I could from the Internet (and we all know how no one ever seems to have the same tools/environment setup as you) so they were a bit ad hoc and more of a personal opinion than anything official.</p>
<p>The following example comes from an actual <a href="http://www.wrox.com/WileyCDA/WroxTitle/Microsoft-SQL-Server-Reporting-Services-Recipes-for-Designing-Expert-Reports.productCd-0470563117.html" target="external">book</a> that my day job purchased for us. It includes a better example of an Outlook-like monthly calendar with interactivity. You could just <a href="http://www.wrox.com/WileyCDA/WroxTitle/Microsoft-SQL-Server-Reporting-Services-Recipes-for-Designing-Expert-Reports.productCd-0470563117,descCd-DOWNLOAD.html" target="external">download</a> it from the web but I have the additional task of connecting it to an events database.</p>
<p><strong>Main Calendar Generator Function</strong></p>
<pre>CREATE FUNCTION fn_GenerateMonth(@MonthNum int, @Year int)
RETURNS
@Month TABLE
(
	-- Add the clumn definitions for the TABLE variable here
	MonthDate datetime,
	DayNumber int,
	DayName varchar(12),
	DayOfWeek int,
	WeekOfMonth int,
	MonthName varchar(12)
)
AS
BEGIN
	DECLARE @MonthDate datetime
	DECLARE @WeekOfMonth int
	DECLARE @WeekFillDate datetime
	DECLARE @MonthName varchar(12)

	SET @WeekOfMonth = 1

	-- Find the first day of the month and the month name
	SET @MonthDate = RIGHT('0' + CONVERT(varchar(2), @MonthNum),2) + '/01/' + CONVERT(char(4), @Year)
	SET @MonthName = DATENAME(mm, @MonthDate)

	-- Back up to the first day of the week containing the first day of the month.
	SET @WeekFillDate = @MonthDate
	WHILE DATEPART(dw, @WeekFillDate) &gt; 1
	BEGIN
		SET @WeekFillDate = DATEADD(dd, -1, @WeekFillDate)

		INSERT INTO
		@Month (MonthDate, DayNumber, DayName, DayOfWeek, WeekOfMonth, MonthName)
		VALUES (@WeekFillDate, DAY(@WeekFillDate), DATENAME(dw, @WeekFillDate), DATEPART(dw, @WeekFillDate), @WeekOfMonth, @MonthName)
	END

	WHILE MONTH(@MonthDate) = @MonthNum
	BEGIN
		IF DATEPART(dw, @MonthDate) = 1 AND DAY(@MonthDate) &gt; 1
		BEGIN
			SET @WeekOfMonth = @WeekOfMonth + 1
		END

		INSERT INTO
		@Month (MonthDate, DayNumber, DayName, DayOfWeek, WeekOfMonth, MonthName)
		VALUES (@MonthDate, DAY(@MonthDate), DATENAME(dw, @MonthDate), DATEPART(dw, @MonthDate), @WeekOfMonth, @MonthName)

		SET @MonthDate = DATEADD(dd, 1, @MonthDate)
	END

	-- Finish up the week containing the last day fo the month.
	SET @WeekFillDate = DATEADD(dd, -1, @MonthDate)
	WHILE DATEPART(dw, @WeekFillDate) &lt; 7
	BEGIN
		SET @WeekFillDate = DATEADD(dd, -1 , @MonthDate)

		INSERT INTO
		@Month (MonthDate, DayNumber, DayName, DayOfWeek, WeekOfMonth, MonthName)
		VALUES (@WeekFillDate, DAY(@WeekFillDate), DATENAME(dw, @WeekFillDate), DATEPART(dw, @WeekFillDate), @WeekOfMonth, @MonthName)
	END
	RETURN
END

	-- We can see the output from the function by running a simple test query in SQL
	-- Server Management Studio, executing this command, passing 12 for the month and 2009 for the year.
	-- Example: SELECT * FROM dbo.fn_GenerateMonth(12, 2009)</pre>
<p><span style="color: red; font-weight: bold;">Do not use this article: In the middle of doing</span></p>
]]></content:encoded>
			<wfw:commentRss>http://demo.joellipman.com/wordpress/?feed=rss2&#038;p=493</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

