<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Integration Points</title>
	<atom:link href="http://dmgorman.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dmgorman.wordpress.com</link>
	<description>Extending Corporate Data ...</description>
	<lastBuildDate>Wed, 09 Nov 2011 14:40:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dmgorman.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Integration Points</title>
		<link>http://dmgorman.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dmgorman.wordpress.com/osd.xml" title="Integration Points" />
	<atom:link rel='hub' href='http://dmgorman.wordpress.com/?pushpress=hub'/>
		<item>
		<title>#48 Sharepoint RadGrid Export Affecting Subsequent Posts</title>
		<link>http://dmgorman.wordpress.com/2011/11/07/48-sharepoint-radgrid-export-affecting-subsequent-posts/</link>
		<comments>http://dmgorman.wordpress.com/2011/11/07/48-sharepoint-radgrid-export-affecting-subsequent-posts/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 18:01:43 +0000</pubDate>
		<dc:creator>dmgorman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dmgorman.wordpress.com/?p=614</guid>
		<description><![CDATA[To correct the issue where your export to Excel stops any further postbacks add the following code to your image button or button that invokes the export. cf. Sharepoint Forum Link OnClientClick=&#8221;_spSuppressFormOnSubmitWrapper = true; _spFormOnSubmitCalled = false;&#8221;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=614&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To correct the issue where your export to Excel stops any further postbacks add the following code to<br />
your image button or button that invokes the export.</p>
<p>cf. <a href="http://sharepoint.stackexchange.com/questions/20239/asp-net-validators-part-of-custom-control-in-webpart" target="_blank">Sharepoint Forum Link</a></p>
<h6><strong>OnClientClick=&#8221;_spSuppressFormOnSubmitWrapper = true; _spFormOnSubmitCalled = false;&#8221;</strong></h6>
<p><pre class="brush: xml;">
   &lt;asp:ImageButton ID=&quot;ibExcelExport&quot; runat=&quot;server&quot; CausesValidation=&quot;False&quot; ImageUrl=&quot;../images/ExcelExport.jpg&quot;
   onclick=&quot;ibExcelExport_Click&quot;
   OnClientClick=&quot;_spSuppressFormOnSubmitWrapper = true; _spFormOnSubmitCalled = false;&quot;   /&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmgorman.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmgorman.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmgorman.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmgorman.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dmgorman.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dmgorman.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dmgorman.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dmgorman.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmgorman.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmgorman.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmgorman.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmgorman.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmgorman.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmgorman.wordpress.com/614/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=614&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dmgorman.wordpress.com/2011/11/07/48-sharepoint-radgrid-export-affecting-subsequent-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f40e4ba23d8f519bc9491fe6ae71f78?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmgorman</media:title>
		</media:content>
	</item>
		<item>
		<title>#47 Simple T-SQL UDF Providing Leading Zeroes</title>
		<link>http://dmgorman.wordpress.com/2011/10/20/47-simple-t-sql-udf-providing-leading-zeroes/</link>
		<comments>http://dmgorman.wordpress.com/2011/10/20/47-simple-t-sql-udf-providing-leading-zeroes/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 16:46:08 +0000</pubDate>
		<dc:creator>dmgorman</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[t-sql]]></category>

		<guid isPermaLink="false">http://dmgorman.wordpress.com/?p=601</guid>
		<description><![CDATA[This is simply a conversion of this post to an UDF that provides leading zero support on an int field &#38; returns a varchar(20).<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=601&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is simply a conversion of this <a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=57180" title="Post" target="_blank">post</a> to an UDF that provides leading zero support on an int field &amp; returns a varchar(20).</p>
<p><pre class="brush: sql;">
Create FUNCTION [dbo].[udf_LeadingZeroes]
(     
        @FieldValue        int
    ,   @LeadZeroCount     int
)

RETURNS varchar(20) AS

BEGIN

	Declare @ReturnString   varchar(20)
 
	Set @ReturnString = RIGHT(REPLICATE('0', @LeadZeroCount) + CONVERT(varchar(20), @FieldValue), @LeadZeroCount)
	
	RETURN @ReturnString

END

-- Usage 
Select dbo.udf_LeadingZeroes(ColName,4) as ColName_With_LeadingZeroes 
From SomeTable 

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmgorman.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmgorman.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmgorman.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmgorman.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dmgorman.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dmgorman.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dmgorman.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dmgorman.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmgorman.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmgorman.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmgorman.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmgorman.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmgorman.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmgorman.wordpress.com/601/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=601&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dmgorman.wordpress.com/2011/10/20/47-simple-t-sql-udf-providing-leading-zeroes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f40e4ba23d8f519bc9491fe6ae71f78?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmgorman</media:title>
		</media:content>
	</item>
		<item>
		<title>#46 Windows Platform Eclipse launch locking issue</title>
		<link>http://dmgorman.wordpress.com/2011/07/22/46-windows-platform-eclipse-launch-locking-issue/</link>
		<comments>http://dmgorman.wordpress.com/2011/07/22/46-windows-platform-eclipse-launch-locking-issue/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 18:05:29 +0000</pubDate>
		<dc:creator>dmgorman</dc:creator>
				<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://dmgorman.wordpress.com/?p=593</guid>
		<description><![CDATA[If you see this launch error &#8220;Locking is not possible in the directory &#8220;{IM_HOME}/eclipse/configuration/org.eclipse.osgi&#8221;. A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking passing &#8220;-Dosgi.locking=&#8221;none&#8221; as a VM argument. ...&#8221; cf. https://www-304.ibm.com/support/docview.wss?uid=swg21455334 &#8220;Change the permission for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=593&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you see this launch error &#8220;<em>Locking is not possible in the directory &#8220;{IM_HOME}/eclipse/configuration/org.eclipse.osgi&#8221;. A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking passing &#8220;-Dosgi.locking=&#8221;none&#8221; as a VM argument. ..</em>.&#8221;</p>
<p>cf. <a href="https://www-304.ibm.com/support/docview.wss?uid=swg21455334">https://www-304.ibm.com/support/docview.wss?uid=swg21455334</a> &#8220;Change the permission for <code>.fileTableLock</code> file to <code>777"</code> instructions for *nix</p>
<p>Translated for Windows (Win7) go to the {App Root} \configuration\org.eclipse.osgi\.manager directory</p>
<p>Right Click Props on <code>.fileTableLock  </code></p>
<p>Use Security Tab &#8211; Select {machine name]\Users and click on Edit button.</p>
<p>Allow full control  &#8211; click OK</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmgorman.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmgorman.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmgorman.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmgorman.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dmgorman.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dmgorman.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dmgorman.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dmgorman.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmgorman.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmgorman.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmgorman.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmgorman.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmgorman.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmgorman.wordpress.com/593/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=593&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dmgorman.wordpress.com/2011/07/22/46-windows-platform-eclipse-launch-locking-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f40e4ba23d8f519bc9491fe6ae71f78?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmgorman</media:title>
		</media:content>
	</item>
		<item>
		<title>#45 Simple Powershell script to setup an email alert based on a DB query</title>
		<link>http://dmgorman.wordpress.com/2011/05/16/45-simple-powershell-script-to-setup-an-email-alert-based-on-a-db-query/</link>
		<comments>http://dmgorman.wordpress.com/2011/05/16/45-simple-powershell-script-to-setup-an-email-alert-based-on-a-db-query/#comments</comments>
		<pubDate>Mon, 16 May 2011 16:55:57 +0000</pubDate>
		<dc:creator>dmgorman</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://dmgorman.wordpress.com/?p=580</guid>
		<description><![CDATA[This is a script destined for a scheduled task/cron that reads the DB, gets a count to alert via email if data is missing. (aka &#8220;Miner&#8217;s Canary&#8221;/ heartbeat) Credits due: http://weblogs.asp.net/soever/archive/2006/12/31/powershell-pitfalls-reading-text-from-file-using-get-content.aspx http://poshcode.org/1791<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=580&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a script destined for a scheduled task/cron that reads the DB, gets a count to alert via email if data is missing. (aka &#8220;Miner&#8217;s Canary&#8221;/ heartbeat)</p>
<p>Credits due:<br />
<a href="http://weblogs.asp.net/soever/archive/2006/12/31/powershell-pitfalls-reading-text-from-file-using-get-content.aspx">http://weblogs.asp.net/soever/archive/2006/12/31/powershell-pitfalls-reading-text-from-file-using-get-content.aspx</a></p>
<p><em><a href="http://poshcode.org/1791">http://poshcode.org/1791</a></em></p>
<p><pre class="brush: powershell;">

### Create tempfile
$filename = [System.IO.Path]::GetTempFileName()

### Read DB to query Long table for SCADA data
Invoke-Sqlcmd2 -ServerInstance &quot;DBserver\InstanceName&quot; -Database &quot;DBNAME&quot; -Query &quot;Select '[' + RTRIM(COUNT(*)) +']'  from TargetTable Where LogDate = getdate();&quot; | Format-List | Out-File $filename;

### read tempfile as string
$a = [string]::join([environment]::newline, (get-content $filename))

### SMTP call you can put in an IP or FQDN for the SMTP server
if ($a.Contains(&quot;[0]&quot;))
{
$smtp = New-Object System.Net.Mail.SMTPClient -ArgumentList smtpservername
$smtp.Send('from@mail.com', 'toaddress@mail.com', 'subject line', &quot;Message Body&quot;)
}

### Delete temp file
Remove-Item $filename

### Simple utility to connect to SQL without frills
function Invoke-Sqlcmd2
{
param(
[string]$ServerInstance,
[string]$Database,
[string]$Query,
[Int32]$QueryTimeout=30
)

$conn=new-object System.Data.SqlClient.SQLConnection
$conn.ConnectionString=&quot;Server={0};Database={1};Integrated Security=True&quot; -f $ServerInstance,$Database
$conn.Open()
$cmd=new-object system.Data.SqlClient.SqlCommand($Query,$conn)
$cmd.CommandTimeout=$QueryTimeout
$ds=New-Object system.Data.DataSet
$da=New-Object system.Data.SqlClient.SqlDataAdapter($cmd)
[void]$da.fill($ds)
$conn.Close()
$ds.Tables[0]

}

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmgorman.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmgorman.wordpress.com/580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmgorman.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmgorman.wordpress.com/580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dmgorman.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dmgorman.wordpress.com/580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dmgorman.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dmgorman.wordpress.com/580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmgorman.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmgorman.wordpress.com/580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmgorman.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmgorman.wordpress.com/580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmgorman.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmgorman.wordpress.com/580/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=580&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dmgorman.wordpress.com/2011/05/16/45-simple-powershell-script-to-setup-an-email-alert-based-on-a-db-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f40e4ba23d8f519bc9491fe6ae71f78?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmgorman</media:title>
		</media:content>
	</item>
		<item>
		<title>#44 SQL Reporting Blank Row, avg() &amp; min() For Zero Values</title>
		<link>http://dmgorman.wordpress.com/2011/03/18/41-sql-reporting-blank-row/</link>
		<comments>http://dmgorman.wordpress.com/2011/03/18/41-sql-reporting-blank-row/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 13:26:55 +0000</pubDate>
		<dc:creator>dmgorman</dc:creator>
				<category><![CDATA[SQL Reporting]]></category>

		<guid isPermaLink="false">http://dmgorman.wordpress.com/?p=565</guid>
		<description><![CDATA[Often just setting your formatting to #.## will make sure you display an empty cell (display nothing)  for zero value.  If you need a different format mask for whatever reason you can use this routine. Report Props &#8211; select Code and drop this vbs function in. It is referenced in a cell via the prefix [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=565&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Often just setting your formatting to #.## will make sure you display an empty cell (display nothing)  for zero value.  If you need a different format mask for whatever reason you can use this routine. </strong></p>
<p>Report Props &#8211; select Code and drop this vbs function in. It is referenced in a cell via the prefix Code.<br />
i.e. <strong>=Code.BlankZeroRow(Fields!FieldName.Value, &#8220;datasetName&#8221;),4)</strong></p>
<p><em>Average &amp; Min values can check for numbers less than reporting precision and not count them so as not to report zero values as minimum and skew average values by inflating the count with zero values collected:</em></p>
<p><strong>=Min(iif(Fields!fieldName.Value &gt; 0.009, Fields!fieldName.Value, Nothing))</strong></p>
<p><strong>=Sum(Fields!fieldName.Value) / IIf(Count(iif(Fields!fieldName.Value &gt; 0.009, 1, Nothing)) = 0, 1, Count(iif(Fields!fieldName.Value &gt; 0.009, 1, Nothing)))</strong></p>
<p><strong><br />
</strong></p>
<p>The precision check is for both formatting decimal places and counting values less than the presented precision to be zero. <em>The formatting can be set on the cell (Text Box Props) so may not be necessary. You can probably better use the MOD function for the minimal value check but I have not tested that out yet.<br />
</em></p>
<p><pre class="brush: vb;">

Function BlankZeroRow(VALUE as Double, Precision as Integer)
	Dim sRETURN  as string
	sRETURN = &quot;&quot;	' default blank

	Select Case Precision 	' Test Precision
	Case 0
		If (Value &gt; 0.9) then
			sRETURN =  Format(VALUE,&quot;##0&quot;)
		End If
	Case 1
		If (Value &gt; 0.09) then
			sRETURN =  Format(VALUE,&quot;##0.0&quot;)
		End If
	Case 2
		If (Value &gt; 0.009) then
			sRETURN =  Format(VALUE,&quot;##0.00&quot;)
		End If
	Case 3
		If (Value &gt; 0.0009) then
			sRETURN =  Format(VALUE,&quot;##0.000&quot;)
		End If
	Case 4
		If (Value &gt; 0.00009) then
			sRETURN =  Format(VALUE,&quot;##0.0000&quot;)
		End If
	Case Else
		If (Value &gt; 0.009) then
			sRETURN =  Format(VALUE,&quot;##0.00&quot;)
		End If
	End Select

	BlankZeroRow = sRETURN
End Function

</pre></p>
<p><strong>Cell definitions for Min/Max/Average/Sum when receiving nulls:</strong></p>
<p><pre class="brush: vb;">
=Min(Fields!Value_Col14.Value)
=Max(Fields!Value_Col14.Value)
=Avg(iif(IsNumeric(Fields!Value_Col14.Value), CDbl(Fields!Value_Col14.Value), Nothing))
=Sum(iif(Fields!Value_Col14.Value &gt; 0, CDbl(Fields!Value_Col14.Value), Nothing))

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmgorman.wordpress.com/565/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmgorman.wordpress.com/565/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmgorman.wordpress.com/565/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmgorman.wordpress.com/565/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dmgorman.wordpress.com/565/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dmgorman.wordpress.com/565/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dmgorman.wordpress.com/565/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dmgorman.wordpress.com/565/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmgorman.wordpress.com/565/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmgorman.wordpress.com/565/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmgorman.wordpress.com/565/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmgorman.wordpress.com/565/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmgorman.wordpress.com/565/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmgorman.wordpress.com/565/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=565&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dmgorman.wordpress.com/2011/03/18/41-sql-reporting-blank-row/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f40e4ba23d8f519bc9491fe6ae71f78?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmgorman</media:title>
		</media:content>
	</item>
		<item>
		<title>#43 Simple Grid bind error &#8216;These columns don&#8217;t currently have unique values&#8217;</title>
		<link>http://dmgorman.wordpress.com/2010/10/11/43-simple-grid-bind-error-these-columns-dont-currently-have-unique-values/</link>
		<comments>http://dmgorman.wordpress.com/2010/10/11/43-simple-grid-bind-error-these-columns-dont-currently-have-unique-values/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 15:51:59 +0000</pubDate>
		<dc:creator>dmgorman</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://dmgorman.wordpress.com/?p=561</guid>
		<description><![CDATA[This is caused usually by untrimmed data &#8211; run an update on all selected rows with  =  ltrim(rtrim([field])) Telerik&#8217;s comments on this : http://www.telerik.com/help/aspnet/grid/grderrormessages.html http://www.telerik.com/community/forums/aspnet/grid/21326-these-columns-don-t-currently-have-unique-values.aspx UDF : http://blog.sqlauthority.com/2008/10/09/sql-server-2008-trim-function-user-defined-function/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=561&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is caused usually by untrimmed data &#8211; run an update on all selected rows with  <strong>=  ltrim(rtrim([field]))</strong></p>
<p>Telerik&#8217;s comments on this :</p>
<p><a href="http://www.telerik.com/help/aspnet/grid/grderrormessages.html" target="_blank">http://www.telerik.com/help/aspnet/grid/grderrormessages.html</a></p>
<p><a href="http://www.telerik.com/community/forums/aspnet/grid/21326-these-columns-don-t-currently-have-unique-values.aspx" target="_blank">http://www.telerik.com/community/forums/aspnet/grid/21326-these-columns-don-t-currently-have-unique-values.aspx</a></p>
<p>UDF :</p>
<p><a href="http://blog.sqlauthority.com/2008/10/09/sql-server-2008-trim-function-user-defined-function/" target="_blank">http://blog.sqlauthority.com/2008/10/09/sql-server-2008-trim-function-user-defined-function/ </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmgorman.wordpress.com/561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmgorman.wordpress.com/561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmgorman.wordpress.com/561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmgorman.wordpress.com/561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dmgorman.wordpress.com/561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dmgorman.wordpress.com/561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dmgorman.wordpress.com/561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dmgorman.wordpress.com/561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmgorman.wordpress.com/561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmgorman.wordpress.com/561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmgorman.wordpress.com/561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmgorman.wordpress.com/561/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmgorman.wordpress.com/561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmgorman.wordpress.com/561/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=561&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dmgorman.wordpress.com/2010/10/11/43-simple-grid-bind-error-these-columns-dont-currently-have-unique-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f40e4ba23d8f519bc9491fe6ae71f78?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmgorman</media:title>
		</media:content>
	</item>
		<item>
		<title>#42 Deltek Seq Field in a SPROC</title>
		<link>http://dmgorman.wordpress.com/2010/08/12/42-deltek-seq-field-in-a-sproc/</link>
		<comments>http://dmgorman.wordpress.com/2010/08/12/42-deltek-seq-field-in-a-sproc/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 14:26:56 +0000</pubDate>
		<dc:creator>dmgorman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dmgorman.wordpress.com/?p=520</guid>
		<description><![CDATA[The limitation of not being able to put a non-deterministic rand() call in a SQL User Defined Function forces usage of code like this in a SPROC to generate the SEQ Number that creates uniqueness in Deltek Grid.  If anyone has more info and / or a better way please comment. Apparently you can get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=520&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The limitation of not being able to put a <a href="http://msdn.microsoft.com/en-us/library/ms191320%28SQL.90%29.aspx" target="_blank">non-deterministic rand()</a> call in a SQL User Defined Function forces usage of code like this in a SPROC to generate the SEQ Number that creates uniqueness in Deltek Grid.  If anyone has more info and / or a better way please comment.</p>
<p>Apparently you can get around this limitation and create a UDF see this post:<a href="http://www.dbtechie.com/sql-server/user-defined-functions-udf/random-thoughts-on-sql-server/" target="_self"> http://www.dbtechie.com/sql-server/user-defined-functions-udf/random-thoughts-on-sql-server/</a></p>
<p>Here is what I put in my custom grid insert. I had to create the rand number in 2 parts otherwise it would use the exponent notation.</p>
<p><strong>Results as 20 char Seq # ::  XXXXXX1110300245842</strong></p>
<p><pre class="brush: sql;">
,  @ModUser + '1'        -- Username 6 chars
+ Convert(nvarchar(255),100000 + (100000*RAND()))
+ Convert(nvarchar(255),100000 + (100000*RAND()))
</pre></p>
<p>Whole SPROC used for custom grid (Username is ModUser):</p>
<p><pre class="brush: sql;">
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

Create  Procedure [dbo].[LoadFunding]
(
        @WBS1						        varchar(30)
      , @Username					        varchar(6)
      , @custFundingRequestedAmount		decimal(19,5)
      , @custFundingNotes				        varchar(1000)
      , @custFund						varchar(255)
      , @custFundingReceivedAmount		decimal(19,5)

)
as
INSERT INTO [Projects_Funding]
           ([WBS1]
           ,[WBS2]
           ,[WBS3]
           ,[Seq]
           ,[custFundingRequestedAmount]
           ,[custFundingNotes]
           ,[custFund]
           ,[custFundingReceivedAmount]
		   )
     VALUES
			(
                          @WBS1
			,' '
			,' '
			,  @Username + '1'		-- Create SEQ# (20 chars i.e.  xxxxxx1262113234429)
					+ Convert(nvarchar(255),100000 + (100000*RAND()))
					+ Convert(nvarchar(255),100000 + (100000*RAND()))
			, @custFundingRequestedAmount
			, @custFundingNotes
			, @custFund
			, @custFundingReceivedAmount
			)
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmgorman.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmgorman.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmgorman.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmgorman.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dmgorman.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dmgorman.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dmgorman.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dmgorman.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmgorman.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmgorman.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmgorman.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmgorman.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmgorman.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmgorman.wordpress.com/520/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=520&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dmgorman.wordpress.com/2010/08/12/42-deltek-seq-field-in-a-sproc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f40e4ba23d8f519bc9491fe6ae71f78?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmgorman</media:title>
		</media:content>
	</item>
		<item>
		<title>#41 Breadcrumb Control based on a SPList</title>
		<link>http://dmgorman.wordpress.com/2010/08/09/41-breadcrumb-control-based-on-splist/</link>
		<comments>http://dmgorman.wordpress.com/2010/08/09/41-breadcrumb-control-based-on-splist/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 22:00:16 +0000</pubDate>
		<dc:creator>dmgorman</dc:creator>
				<category><![CDATA[Linq]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[linq]]></category>

		<guid isPermaLink="false">http://dmgorman.wordpress.com/?p=503</guid>
		<description><![CDATA[Based on the prior post #40 You can plumb in a SPList to feed the urls to match on and decide to ignore, replace or substitute 2 nodes for a directory path.  For help on SPMetal &#38; SP Linq see: http://socialsp.com/2009/12/11/having-fun-with-the-new-linq-to-sharepoint-on-sharepoint-2010-sp2010/ SP List to Feed URL matching (done using a simple switch() in the prior [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=503&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Based on the prior post <a href="http://dmgorman.wordpress.com/2010/07/21/40-taking-control-of-sharepoint-2010s-breadcrumb/" target="_blank">#40</a> You can plumb in a SPList to feed the urls to match on and decide to ignore, replace or substitute 2 nodes for a directory path.  For help on SPMetal &amp; SP Linq see: <a href="http://socialsp.com/2009/12/11/having-fun-with-the-new-linq-to-sharepoint-on-sharepoint-2010-sp2010/" target="_blank">http://socialsp.com/2009/12/11/having-fun-with-the-new-linq-to-sharepoint-on-sharepoint-2010-sp2010/ </a></p>
<p>SP List to Feed URL matching (done using a simple switch() in the prior post)</p>
<p><a href="http://dmgorman.files.wordpress.com/2010/08/bclist.jpg"><img class="aligncenter size-full wp-image-507" title="BCList" src="http://dmgorman.files.wordpress.com/2010/08/bclist.jpg?w=622&#038;h=392" alt="Breadcrumb List" width="622" height="392" /></a></p>
<p><pre class="brush: csharp;">
using System;
using System.Collections.Specialized;
using System.IO;
using System.Text;
using System.Web.UI;
using System.Linq;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Linq;

namespace SPBreadCrumb.ControlTemplates.SPBreadCrumb
{

    public partial class BWBreadcrumb : UserControl
    {

        private const string siteURL = @&quot;http://Sharepoint/Site&quot;;
        protected SPMetalDataContext TT = new SPMetalDataContext(siteURL);

        StringBuilder sbResult = new StringBuilder();				// Holds the Breadcrumb HTML.
        StringBuilder sbBcUrl = new StringBuilder();				// Holds the URL of the breadcrumb.
        // Dir are appended in succession to the root.
        private HybridDictionary labels = new HybridDictionary();	// Holds the &quot;friendly&quot; directory names.

        private string Separator = &quot;&gt; &quot;;

        protected void Page_Load(object sender, EventArgs e)
        {
            string strHostUrl = &quot;http://&quot; + Page.Request.ServerVariables[&quot;HTTP_HOST&quot;] + &quot;/&quot;;
            sbBcUrl.Append(strHostUrl);

            string scriptName = Page.Request.ServerVariables[&quot;SCRIPT_NAME&quot;];
            string strScriptDir = Path.GetDirectoryName(scriptName);
            bool bHasExtension = Path.HasExtension(scriptName);

            strScriptDir = strScriptDir.Substring(1);
            string[] strDirs = strScriptDir.Split('\\');
            int nNumDirs = strDirs.Length;

            // Node setup on Breadcrumb
            bool FirstNode = true;
            foreach (string strDirName in strDirs)
            {
                sbBcUrl.Append(strDirName + &quot;/&quot;);  // URL SETUP
                sbResult.Append(buildLinkNode(FirstNode, sbBcUrl.ToString(), strDirName));
                FirstNode = false;
            }

            sbResult.Append(Path.GetFileName(scriptName));  // Show File Name
            lblBC.Text = sbResult.ToString();
        }

        private string buildLinkNode(bool FirstNode, string URL, string DirName)
        {

            string sResults = &quot;&quot;;
            try
            {
		                   // Run SPMetal utility to get object to reference site
                using (SPMetalDataContext ctx = new SPMetalDataContext(SPContext.Current.Web.Url))
                {
                    ctx.ObjectTrackingEnabled = false;
		                                               // SPList Reference Here&lt;&gt;
                    EntityList&lt;BWInternal_BreadcrumbItem&gt; BC = ctx.GetList&lt;Internal_BreadcrumbItem&gt;(&quot;BWInternal_Breadcrumb&quot;);
                    var query = from c in BC.ToList()
                                select c;

                    foreach (var bc in query)
                    {

                        if (bc.ReadURL.ToString().ToLower() == URL.ToLower())
                            sResults = setupBCNode(FirstNode, bc.Node1URL, bc.Node1Label, bc.Node2URL, bc.Node2Label);

                    }

                }
            }
            catch {}

            return(sResults);

        }

        private string setupBCNode(bool FirstNode, string URL1, string Label1, string URL2, string Label2)
        {
            string s = &quot;&quot;;
            if (!FirstNode)
                s += Separator;
             s = &quot;&lt;a href='&quot; + URL1 + @&quot;' &gt; &quot; + Label1 + @&quot;&lt;/a&gt; &quot;;

            if (URL2 == null || URL2.Trim().Length &gt; 0)
                s += Separator + &quot; &lt;a href='&quot; + URL2 + @&quot;' &gt; &quot; + Label2 + @&quot;&lt;/a&gt; &quot;;
            return (s);
        }

    }
}

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmgorman.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmgorman.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmgorman.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmgorman.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dmgorman.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dmgorman.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dmgorman.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dmgorman.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmgorman.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmgorman.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmgorman.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmgorman.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmgorman.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmgorman.wordpress.com/503/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=503&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dmgorman.wordpress.com/2010/08/09/41-breadcrumb-control-based-on-splist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f40e4ba23d8f519bc9491fe6ae71f78?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmgorman</media:title>
		</media:content>

		<media:content url="http://dmgorman.files.wordpress.com/2010/08/bclist.jpg" medium="image">
			<media:title type="html">BCList</media:title>
		</media:content>
	</item>
		<item>
		<title>#40 Taking Control of the Sharepoint 2010 Breadcrumb</title>
		<link>http://dmgorman.wordpress.com/2010/07/21/40-taking-control-of-sharepoint-2010s-breadcrumb/</link>
		<comments>http://dmgorman.wordpress.com/2010/07/21/40-taking-control-of-sharepoint-2010s-breadcrumb/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 15:48:14 +0000</pubDate>
		<dc:creator>dmgorman</dc:creator>
				<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://dmgorman.wordpress.com/?p=476</guid>
		<description><![CDATA[cf. Linking This BreadCrumb control to a SPList in Post #41 Working with the default breadcrumb in SP2010 I found the following issues: If you have site pages and want to navigate from one to the other you may want to show a hierarchy that does not physically exist in SP (i.e. pages all in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=476&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>cf. Linking This BreadCrumb control to a SPList in <a href="http://dmgorman.wordpress.com/2010/08/09/41-breadcrumb-control-based-on-splist/" target="_blank">Post #41</a></p>
<p>Working with the default breadcrumb in SP2010 I found the following issues: If you have site pages and want to navigate from one to the other you may want to show a hierarchy that does not physically exist in SP (i.e. pages all in site pages).  In addition, certain directories in the path used by SP may lead the user to nowhere useful.  Below I have code for a user control that I have added to the v4.masterpage. It is deployed as a feature to ControlTemplates (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES). In VS2010 add blank Sharepoint 2010 project and add new item: Usercontrol.</p>
<p>First the User Control.  This is based on an older project <a title="Original Project " href="http://www.codeproject.com/KB/aspnet/breadcrumbs.aspx" target="_blank"> http://www.codeproject.com/KB/aspnet/breadcrumbs.aspx</a>. I use a simple switch statement to match URL and decide on how to present the node and target URL but hope to read a SPList or a SiteMap for a more manageable solution going forward.</p>
<p>The result of this is a breadcrumb looking like (&amp; linked to) whatever you want. You can ignore a virtual directory, define the label &amp; link or even define multiple &#8216;nodes&#8217; on your breadcrumb for each directory in the path.</p>
<p><a href="http://dmgorman.files.wordpress.com/2010/07/breadcrumb.png"><img class="aligncenter size-full wp-image-480" title="breadcrumb" src="http://dmgorman.files.wordpress.com/2010/07/breadcrumb.png?w=415&#038;h=85" alt="" width="415" height="85" /></a></p>
<p><pre class="brush: csharp;">
using System;
using System.Collections.Specialized;
using System.IO;
using System.Text;
using System.Web.UI;

namespace SPBreadCrumb.ControlTemplates.SPBreadCrumb
{
 public partial class Breadcrumb : UserControl
 {
 StringBuilder sbResult = new StringBuilder();                // Holds the Breadcrumb HTML.
 StringBuilder sbBcUrl = new StringBuilder();                // Holds the URL of the breadcrumb.
 // Dir are appended in succession to the root.
 private HybridDictionary labels = new HybridDictionary();    // Holds the &quot;friendly&quot; directory names.
 private bool ShowFileName = true;
 private string Separator = &quot;&gt;&quot;;
 private string RootUrl = @&quot;/&quot;;
 private string RootName = &quot;Home &quot;;

 protected void Page_Load(object sender, EventArgs e)
 {

 // Create the root breadcrumb (corresponds to the root directory).
 //
 sbResult.Append(&quot;&lt;a href=\&quot;&quot; + RootUrl + &quot;\&quot;&gt;&quot; + RootName + &quot;&lt;/a&gt;&quot;);

 //
 // Get the site URL.  Use a StringBuilder to hold the URL so that we can append
 // directory names in succession.
 //
 string strHostUrl = &quot;http://&quot; + Page.Request.ServerVariables[&quot;HTTP_HOST&quot;] + &quot;/&quot;;
 sbBcUrl.Append(strHostUrl);

 //
 // Break up the path parts into an array (directory name(s) and/or file name).
 //
 string scriptName = Page.Request.ServerVariables[&quot;SCRIPT_NAME&quot;];
 string strScriptDir = Path.GetDirectoryName(scriptName);
 bool bHasExtension = Path.HasExtension(scriptName);

 //
 // Create breadcrumb HTML for the directory name(s).
 // ***     Note: Remove the first &quot;\&quot;; otherwise, when you split the string, the first item in the
 //         array is an empty string.
 //
 strScriptDir = strScriptDir.Substring(1);
 string[] strDirs = strScriptDir.Split('\\');
 int nNumDirs = strDirs.Length;

 //
 // Splitting the string &quot;\&quot; (root directory) produces an array with an empty string as its only element.  If there is
 // only one element and it is the empty string, then we are in the root directory.  If the user has chosen
 // to display the file name, then the separator and the file name will be appended to the Web site root
 // Name/URL.
 //
 // If, however, there is one element and it is NOT the empty string, then we are one directory deep.
 // The else statement is executed and the separator character is inserted.
 //
 string strSeparator = &quot;&quot;;
 if (1 == nNumDirs &amp;&amp; (strDirs[0] == &quot;&quot;))
 {
 strSeparator = &quot;&quot;;
 }
 else
 {
 strSeparator = String.Format(&quot; {0} &quot;, Separator);
 }

 // Node setup on Breadcrumb
 foreach (string strDirName in strDirs)
 {
 sbBcUrl.Append(strDirName + &quot;/&quot;);  // URL SETUP
 // LABELD BC LINK SETUP
 sbResult.Append(buildLinkNode(sbBcUrl.ToString(), strDirName));
 }

 //
 // If the user wants to display file names, do it now.
 //
 if (false != ShowFileName)
 {
 sbResult.Append(String.Format(&quot; {0} {1}&quot;, Separator, Path.GetFileName(scriptName)));
 }

 lblBC.Text = sbResult.ToString();
 }

 /// &lt;summary&gt;
 /// comes back with &quot;&gt; &lt;a href='TranslatedURL'&gt;NodeName&lt;/a&gt;&quot;
 /// &lt;/summary&gt;
 /// &lt;param name=&quot;URL&quot;&gt;&lt;/param&gt;
 /// &lt;param name=&quot;DirName&quot;&gt;&lt;/param&gt;
 /// &lt;returns&gt;&lt;/returns&gt;
 private string buildLinkNode(string URL, string DirName)
 {

 string sReturn = &quot;&quot;;

 // http://serverName/teamtest/SitePages/Home.aspx

 switch (URL.ToLower().Trim())
 {
case @&quot;http://serverName/teamtest/sitepages/&quot;:
sReturn += setupDoubleNode(@&quot;http://www.google.com&quot;, &quot;Node A&quot;, @&quot;http://www.cnn.com&quot;, &quot;Node B&quot;);
 break;
 case @&quot;http://localhost:49169/intranet30/&quot;:
 sReturn += setupSingleNode(@&quot;http://www.bing.com&quot;, &quot;Node (Intranet)&quot;);
 break;
 case @&quot;http://serverName/teamtest/&quot;:
 sReturn += setupSingleNode(@&quot;http://intranet&quot;, &quot;Node (Root)&quot;);
 break;
 default:
 sReturn += setupSingleNode(@&quot;http://intranet&quot;, &quot;Node (&quot; + URL.ToLower().Trim() + &quot;)&quot;);
 break;
 }

 return (sReturn);
 }

 private string setupSingleNode(string URL, string LINK)
 {
 return (Separator + &quot; &lt;a href='&quot; + URL + @&quot;' &gt; &quot; + LINK + @&quot;&lt;/a&gt; &quot;);
 }

 private string setupDoubleNode(string URL1, string LINK1, string URL2, string LINK2)
 {
 string s = Separator + &quot; &lt;a href='&quot; + URL1 + @&quot;' &gt; &quot; + LINK1 + @&quot;&lt;/a&gt; &quot;;
 s += Separator + &quot; &lt;a href='&quot; + URL2 + @&quot;' &gt; &quot; + LINK2 + @&quot;&lt;/a&gt; &quot;;
 return (s);
 }

 }
}
</pre></p>
<p><em><br />
</em>9/21/10 Note: By changing the visible=false attribute you can run into an odd error<br />
“<strong>You must specify a value for this required field</strong>” See this <a href="http://blogs.msdn.com/b/tmathis/archive/2010/03/18/you-must-specify-a-value-for-this-required-field-error-when-hidding-placeholderpagetitleintitlearea.aspx" target="_blank">link</a> for details for a css workaround.<br />
<em><br />
</em></p>
<p>The Masterpage requires a User Control reference, placement of the actual control and visible=&#8217;false&#8217; on existing breadcrumbs.</p>
<p><pre class="brush: xml;">
&lt;%@ Register TagPrefix=&quot;wssuc&quot; TagName=&quot;Breadcrumb&quot; src=&quot;~/_controltemplates/SPBreadcrumb/BWBreadcrumb.ascx&quot; %&gt;
</pre></p>
<p>Place the control in the banner &#8211; use SPD in split mode to navigate and turn off visibility on standard controls until you see what you like.</p>
<p><pre class="brush: xml;">
&lt;td class=&quot;s4-titletext&quot;&gt;&lt;wssuc:BreadCrumb ID=&quot;Test1&quot; runat=&quot;server&quot; /&gt;
...
&lt;SharePoint:SPLinkButton  Visible=&quot;false&quot;  ...
&lt;SharePoint:ClusteredDirectionalSeparatorArrow   Visible=&quot;false&quot;  runat=&quot;server&quot;/&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmgorman.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmgorman.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmgorman.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmgorman.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dmgorman.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dmgorman.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dmgorman.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dmgorman.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmgorman.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmgorman.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmgorman.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmgorman.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmgorman.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmgorman.wordpress.com/476/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=476&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dmgorman.wordpress.com/2010/07/21/40-taking-control-of-sharepoint-2010s-breadcrumb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f40e4ba23d8f519bc9491fe6ae71f78?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmgorman</media:title>
		</media:content>

		<media:content url="http://dmgorman.files.wordpress.com/2010/07/breadcrumb.png" medium="image">
			<media:title type="html">breadcrumb</media:title>
		</media:content>
	</item>
		<item>
		<title>#39 Link External Help PDF to Deltek 6.1 Page</title>
		<link>http://dmgorman.wordpress.com/2010/06/24/39-link-external-help-doc-to-deltek-6-1-page/</link>
		<comments>http://dmgorman.wordpress.com/2010/06/24/39-link-external-help-doc-to-deltek-6-1-page/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 21:49:22 +0000</pubDate>
		<dc:creator>dmgorman</dc:creator>
				<category><![CDATA[Deltek]]></category>
		<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://dmgorman.wordpress.com/?p=464</guid>
		<description><![CDATA[This is an extension of a prior post: http://dmgorman.wordpress.com/2009/07/15/29-popup-under-deltek-6-x-smart-client/ The difference here is that we want to put a blue ? icon on a page and have that launch a pdf or some other resource like an excel file on the onclick event.  It will not launch the pdf directly so we setup a simple [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=464&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is an extension of a prior post: <a href="http://dmgorman.wordpress.com/2009/07/15/29-popup-under-deltek-6-x-smart-client/">http://dmgorman.wordpress.com/2009/07/15/29-popup-under-deltek-6-x-smart-client/</a> The difference here is that we want to put a blue ? icon on a page and have that launch a pdf or some other resource like an excel file on the onclick event.  It will not launch the pdf directly so we setup a simple redirect page that grabs the inbound pdf URL as a query string variable and launches the target pdf. To clean up things this redirect page is closed out.</p>
<p>Step One: Create HTML Redirection Page on a webserver. I use basic javascript but you probably can find some slick jQuery code out there.</p>
<p><strong>redir.htm</strong></p>
<p><pre class="brush: jscript;">
&lt;html&gt;
&lt;head&gt;
&lt;base target=&quot;_self&quot; /&gt;
&lt;script&gt;

function launch() {

var resourceURL = getQueryVariable(&quot;r&quot;);

window.open(resourceURL);

}
// A U T O M A T I C A L L Y   C L O S E    P A G E
// js credit due: http://bytes.com/topic/javascript/answers/145577-self-close-window-without-dialog-close-yes-no
var howLong = 1000;      // one second
var t = null;
function closeMe(){
t = setTimeout(&quot;self.close()&quot;,howLong);
}

// G R A B  T A R G E T  U R L
// js credit due:  http://www.groupsrv.com/dotnet/post-428830.html
function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
var vars = query.split(&quot;&amp;&quot;);
for (var i=0;i&lt;vars.length;i++)
{
var pair = vars[i].split(&quot;=&quot;);
if (pair[0] == variable)
{
return pair[1];
}
}
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;launch();closeMe();&quot;&gt;
  &lt;!-- Link To Close But Page Should Close Within 1 second via closeMe() --&gt;
  &lt;a href=&quot;javascript:self.close()&quot;&gt;click here to close&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt;

</pre></p>
<p>STEP TWO: Add a Blue Help button on the target page.<br />
Change the Help Text properties by Control-V paste<br />
do not click on the ellipsis &#8230; and paste in the following<br />
as a single line (no line breaks):</p>
<p><pre class="brush: jscript;">

&lt;script&gt;javascript:popup_window=window.showModalDialog(&quot;http://MyWebserver/redir.htm?r=http://myHelpFile.pdf&quot;,'_parent', &quot;dialogHeight: 100px;&quot;);&lt;/script&gt;

</pre></p>
<p>The onclick event will launch 2 windows and then the target resource url in the &#8216;r&#8217; querystring variable. The second page redir.htm should self close in a 1 second. I have not been successful automatically removing the base window that is launched &#8211; it remains to be manually closed by the user. Please post a comment if you have found a solution to that issue.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmgorman.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmgorman.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmgorman.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmgorman.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dmgorman.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dmgorman.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dmgorman.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dmgorman.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmgorman.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmgorman.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmgorman.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmgorman.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmgorman.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmgorman.wordpress.com/464/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmgorman.wordpress.com&amp;blog=2497805&amp;post=464&amp;subd=dmgorman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dmgorman.wordpress.com/2010/06/24/39-link-external-help-doc-to-deltek-6-1-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f40e4ba23d8f519bc9491fe6ae71f78?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmgorman</media:title>
		</media:content>
	</item>
	</channel>
</rss>
