<?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>tensixtyone &#187; crystal reports</title>
	<atom:link href="http://tensixtyone.com/tags/crystal-reports/feed" rel="self" type="application/rss+xml" />
	<link>http://tensixtyone.com</link>
	<description>Rants of Andrew Williams / Nik_Doof</description>
	<lastBuildDate>Fri, 25 Jun 2010 10:58:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>First Working Day in Crystal Reports</title>
		<link>http://tensixtyone.com/perma/first-working-day-in-crystal-reports</link>
		<comments>http://tensixtyone.com/perma/first-working-day-in-crystal-reports#comments</comments>
		<pubDate>Thu, 13 Mar 2008 13:13:00 +0000</pubDate>
		<dc:creator>Andrew Williams</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[crystal reports]]></category>
		<category><![CDATA[custom functions]]></category>
		<category><![CDATA[rcf]]></category>
		<category><![CDATA[reporting]]></category>

		<guid isPermaLink="false">http://blog.tensixtyone.com//2008/03/13/first-working-day-in-crystal-reports</guid>
		<description><![CDATA[From time to time, to save on resources and make things easier you have to bodge certain items. Today&#8217;s example is generating a different report on the first working day of the month than the rest of the month. Crystal Reports doesn&#8217;t offer the functionality to identify the first working day of the month, so [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time, to save on resources and make things easier you have to bodge certain items. Today&#8217;s example is generating a different report on the first working day of the month than the rest of the month. Crystal Reports doesn&#8217;t offer the functionality to identify the first working day of the month, so i&#8217;ve created the following fuction:</p>
<pre>
Function FirstWorkingDayOfMonth(d as Date)
   dim td as date

   ' Grab the first day of the month and check what day of the week it is
   td = datevalue(Year(d),Month(d),1)

   select case dayofweek(td,crMonday)
      case 6
         ' Saturday
         FirstWorkingDayOfMonth = datevalue(year(d),month(d),3)
      case 7
         ' Sunday
         FirstWorkingDayOfMonth = datevalue(year(d),month(d),2)
      case else
         FirstWorkingDayOfMonth = td
   end select
End Function
</pre>
<p>Just incase this is handy for anyone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://tensixtyone.com/perma/first-working-day-in-crystal-reports/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
