<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/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>SSIS Junkie : SSRS</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSRS/default.aspx</link><description>Tags: SSRS</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>SSIS Reporting Pack – a performance tip</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2012/11/05/ssis-reporting-pack-a-performance-tip.aspx</link><pubDate>Mon, 05 Nov 2012 22:36:41 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45948</guid><dc:creator>jamiet</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/jamie_thomson/comments/45948.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jamie_thomson/commentrss.aspx?PostID=45948</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/jamie_thomson/rsscomments.aspx?PostID=45948</wfw:comment><description>&lt;p&gt;SSIS Reporting Pack is a suite of open source SQL Server Reporting Services (SSRS) reports that provide additional insight into the SQL Server Integration Services (SSIS) 2012 Catalog. You can read more about SSIS Reporting Pack &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSIS+Reporting+Pack/default.aspx" target="_blank"&gt;here on my blog&lt;/a&gt; or had over to the home page for the project at &lt;a title="http://ssisreportingpack.codeplex.com/" href="http://ssisreportingpack.codeplex.com/"&gt;http://ssisreportingpack.codeplex.com/&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;After having used SSRS Reporting Pack on a real project for a few months now I have come to realise that if you have any sizeable data volumes in [SSISDB] then the reports in SSIS Reporting Pack will suffer from chronic performance problems – I have seen the “execution” report take upwards of 30minutes to return data. To combat this I highly recommend that you create an index on the &lt;font face="Consolas"&gt;[SSISDB].[internal].[event_messages].[operation_id]&lt;/font&gt; &amp;amp; &lt;font face="Consolas"&gt;[SSISDB].[internal].[operation_messages].[operation_id]&lt;/font&gt; fields. &lt;a href="http://www.ssistalk.com/"&gt;Phil Brammer&lt;/a&gt; has experienced similar problems himself and has since made it easy for the rest of us by preparing some scripts to create the indexes that he recommends and he has shared those scripts via his blog at &lt;a href="http://www.ssistalk.com/SSIS_2012_Missing_Indexes.zip"&gt;http://www.ssistalk.com/SSIS_2012_Missing_Indexes.zip&lt;/a&gt;. If you are using SSIS Reporting Pack, or even if you are simply querying [SSISDB], I highly recommend that you download Phil’s scripts and test them out on your own SSIS Catalog(s).&lt;/p&gt;  &lt;p&gt;Those indexes will not solve all problems but they will make some of your reports run quicker. I am working on some further enhancements that should further improve the performance of the reports. Watch this space.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=45948" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/sql+server/default.aspx">sql server</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/sql+server+integration+services/default.aspx">sql server integration services</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SQL+Server+Reporting+Services/default.aspx">SQL Server Reporting Services</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSIS+Catalog/default.aspx">SSIS Catalog</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSIS+Reporting+Pack/default.aspx">SSIS Reporting Pack</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSRS/default.aspx">SSRS</category></item><item><title>Build-time dependency resolving coming to Entity Framework. Now, how about those BI tools too?</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2010/12/07/build-time-dependancy-checking-coming-to-entity-framework-now-how-about-those-bi-tools-too.aspx</link><pubDate>Tue, 07 Dec 2010 10:04:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:31402</guid><dc:creator>jamiet</dc:creator><slash:comments>4</slash:comments><comments>http://sqlblog.com/blogs/jamie_thomson/comments/31402.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jamie_thomson/commentrss.aspx?PostID=31402</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/jamie_thomson/rsscomments.aspx?PostID=31402</wfw:comment><description>&lt;P&gt;Three months ago I wrote a blog post entitled&amp;nbsp;&lt;A class="" href="http://sqlblog.com/blogs/jamie_thomson/archive/2010/09/14/some-thoughts-on-visual-studio-database-references-and-how-they-should-be-used-for-sql-server-bi.aspx"&gt;Some thoughts on Visual Studio database references and how they should be used for SQL Server BI&lt;/A&gt;&amp;nbsp;where I shared some thoughts on a feature available&amp;nbsp;to database developers in&amp;nbsp;Visual Studio 2010 that I would love to see added to SQL Server Integration Services (SSIS), Analysis Services (SSAS) and Reporting Services (SSRS). In there I said:&lt;/P&gt;&lt;SPAN class=Apple-style-span style="WORD-SPACING:0px;FONT:13px Verdana, Arial, sans-serif;TEXT-TRANSFORM:none;TEXT-INDENT:0px;WHITE-SPACE:normal;LETTER-SPACING:normal;BORDER-COLLAPSE:separate;orphans:2;widows:2;-webkit-border-horizontal-spacing:0px;-webkit-border-vertical-spacing:0px;-webkit-text-decorations-in-effect:none;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&lt;SPAN class=Apple-style-span style="FONT-SIZE:12px;TEXT-ALIGN:justify;"&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;EM&gt;Over the past few weeks I have been making heavy use of the Database tools in Visual Studio 2010 and one of the features that has most impressed me has been database references.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;EM&gt;Database references allow you to have stored procedures in your database project that refer to objects (tables, views, stored procedures etc…) that exist in other database projects and hence when you build your database project it is able to&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;resolve&lt;SPAN class=Apple-converted-space&gt;&amp;nbsp;&lt;/SPAN&gt;those references.&lt;/EM&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;EM&gt;It occurred to me that similar functionality would be incredibly useful for SQL Server Integration Services(SSIS), Analysis Services (SSAS) &amp;amp; Reporting Services (SSRS) projects. After all reports, packages and data source views are rife with references to database objects – why shouldn’t we be able to have design-time dependency checking in our BI projects the same way that database and .Net developers do?&lt;/EM&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;In that blog post I&amp;nbsp;shared links to three Connect submissions where I requested this feature be added to SSIS, SSAS &amp;amp; SSRS. In addition I also submitted a request that the feature be extended to .Net projects so that any reference to a database object in a .Net assembly can be resolved at build time. That Connect submission is at &lt;A class="" href="https://connect.microsoft.com/VisualStudio/feedback/details/602252/entity-fx-use-database-references-to-constrain-the-edm?wa=wsignin1.0"&gt;[Entity FX] Use database references to constrain the EDM&lt;/A&gt;&amp;nbsp;and overnight it received this comment from Microsoft:&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=Apple-style-span style="WORD-SPACING:0px;FONT:medium 'Times New Roman';TEXT-TRANSFORM:none;TEXT-INDENT:0px;WHITE-SPACE:normal;LETTER-SPACING:normal;BORDER-COLLAPSE:separate;orphans:2;widows:2;-webkit-border-horizontal-spacing:0px;-webkit-border-vertical-spacing:0px;-webkit-text-decorations-in-effect:none;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&lt;SPAN class=Apple-style-span style="FONT-SIZE:11px;FONT-FAMILY:Verdana;"&gt;&lt;EM&gt;We have been working on this feature for a while and and will be available soon&lt;/EM&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;This is really good news - it&amp;nbsp;improves the Microsoft developer ecosystem by ensuring invalid references to database references&amp;nbsp;get caught at build time (ideally as part of a Continuous integration build) rather than run time. [Hopefully it might nip this &lt;A class="" href="http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx"&gt;code-first nonsense&lt;/A&gt; in the bud too (Ooo...way to incite flame comments :) ) ]. If you want to see this feature in action then check out a video from Teched Europe last month entitled &lt;A class="" href="http://www.msteched.com/2010/Europe/DAT314"&gt;SQL Server Developer Tools Code-named "Juneau"&lt;/A&gt; where it is demo'd by Lance Delano and Tim Laverty.&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;The point of this blog post though is not just to draw attention to this forthcoming feature for .Net developers, it is to ask you to petition Microsoft to get this feature added to SSIS/SSAS/SSRS too. After all, we already know (from the video above) that the feature is coming to this new code-name Juneau development environment&amp;nbsp;plus we also know that Juneau will be the development environment for SSIS/SSAS/SSRS&amp;nbsp;as well&amp;nbsp;- is it really much of a stretch to expect the BI tools to have access to this great feature too? I don't think so and if you agree with me then I urge you to vote and add a comment to the Connection submissions that are requesting this feature. They are at:&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;A class="" href="https://connect.microsoft.com/SQLServer/feedback/details/597709/" target=_blank&gt;[SSAS] Declare Object Dependancies&lt;/A&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;A class="" href="https://connect.microsoft.com/SQLServer/feedback/details/597707/" target=_blank&gt;[SSRS] Declare Object Dependancies&lt;/A&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;A class="" href="https://connect.microsoft.com/SQLServer/feedback/details/597708/" target=_blank&gt;[SSIS] Declare Object Dependancies&lt;/A&gt;&amp;nbsp;(Update, Apparently someone at Microsoft has deemed it necassary to set this to private and I am not able to change it back even though I submitted it. You can still vote on the other two though.)&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;Let's close that &lt;A class="" href="http://sqlblog.com/blogs/jamie_thomson/archive/2010/01/13/the-sql-developer-gap-warning-rant-coming-up.aspx"&gt;SQL Developer Gap&lt;/A&gt;!&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;A class="" href="http://twitter.com/jamiet"&gt;@Jamiet&lt;/A&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=31402" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/sql+server/default.aspx">sql server</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSAS/default.aspx">SSAS</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/ssis/default.aspx">ssis</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSRS/default.aspx">SSRS</category></item><item><title>Convert an integer seconds value into words in VBScript : Reporting Services</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2010/11/14/convert-an-integer-seconds-value-into-words-in-reporting-services.aspx</link><pubDate>Sun, 14 Nov 2010 22:36:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:30557</guid><dc:creator>jamiet</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/jamie_thomson/comments/30557.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jamie_thomson/commentrss.aspx?PostID=30557</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/jamie_thomson/rsscomments.aspx?PostID=30557</wfw:comment><description>&lt;P&gt;Occasionally I stick random bits of code up on this blog because (a) I know I’ll need it again someday and (b) maybe it’ll be useful for someone else. This particular VBScript function called &lt;FONT face=Consolas&gt;TimeInWords&lt;/FONT&gt; can be used in SQL Server Reporting Services to turn a numerical value representing number of seconds into a meaningful string. For example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Consolas&gt;TimeInWords(53)&lt;/FONT&gt; returns “53s”&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Consolas&gt;TimeInWords(1632)&lt;/FONT&gt; returns “27m 12s”&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Consolas&gt;TimeInWords(7923)&lt;/FONT&gt; returns “2h 12m 3s”&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Consolas&gt;TimeInWords(894823)&lt;/FONT&gt; returns “10d 8h 34m 43s”&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Pretty useful for reporting on durations. I haven’t done endless testing on it but I’m pretty sure it works. Here’s the code:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Consolas&gt;Function TimeInWords (RemainderTimeInSeconds as Integer) AS String &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ReturnValue As String &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (RemainderTimeInSeconds &amp;gt; 86400) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReturnValue = TimeInDays(RemainderTimeInSeconds ) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE IF (RemainderTimeInSeconds &amp;gt; 3600) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReturnValue = TimeInHours(RemainderTimeInSeconds ) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE IF (RemainderTimeInSeconds &amp;gt; 60) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReturnValue = TimeInMinutes(RemainderTimeInSeconds ) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReturnValue = TimeInSeconds(RemainderTimeInSeconds ) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return ReturnValue &lt;BR&gt;End Function&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Consolas&gt;Function TimeInDays (RemainderTimeInSeconds AS Integer) AS String &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return CStr(Floor(RemainderTimeInSeconds / 86400)) + "d " + TimeInHours(RemainderTimeInSeconds Mod 86400) &lt;BR&gt;End Function &lt;BR&gt;Function TimeInHours (RemainderTimeInSeconds AS Integer) AS String &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return CStr(Floor(RemainderTimeInSeconds / 3600)) + "h " + TimeInMinutes(RemainderTimeInSeconds Mod 3600) &lt;BR&gt;End Function &lt;BR&gt;Function TimeInMinutes (RemainderTimeInSeconds AS Integer) AS String &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return CStr(Floor(RemainderTimeInSeconds / 60)) + "m " + TimeInSeconds(RemainderTimeInSeconds Mod 60) &lt;BR&gt;End Function &lt;BR&gt;Function TimeInSeconds (RemainderTimeInSeconds AS Integer) AS String &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return CStr(RemainderTimeInSeconds) + "s" &lt;BR&gt;End Function&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Nothing particularly special but if it saves someone else from writing it well…why not!&lt;/P&gt;
&lt;P&gt;Hope that is useful to someone.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://twitter.com/jamiet"&gt;@Jamiet&lt;/A&gt;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=30557" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SQL+Server+Reporting+Services/default.aspx">SQL Server Reporting Services</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSRS/default.aspx">SSRS</category></item><item><title>Some thoughts on Visual Studio database references and how they should be used for SQL Server BI</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2010/09/14/some-thoughts-on-visual-studio-database-references-and-how-they-should-be-used-for-sql-server-bi.aspx</link><pubDate>Tue, 14 Sep 2010 12:53:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:28755</guid><dc:creator>jamiet</dc:creator><slash:comments>5</slash:comments><comments>http://sqlblog.com/blogs/jamie_thomson/comments/28755.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jamie_thomson/commentrss.aspx?PostID=28755</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/jamie_thomson/rsscomments.aspx?PostID=28755</wfw:comment><description>&lt;P class=MsoNormal&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;Over the past few weeks I have been making heavy use of the Database tools in Visual Studio 2010 (formerly known as datadude, DBPro, VSTS for Database Professionals or one of a plethora of other names that it has gone by over the past few years) and one of the features that has most impressed me has been database references.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;o:p&gt;Database references allow you to have stored procedures in your database project that refer to objects (tables, views, stored procedures etc…) that exist in other database projects and hence when you build your database project it is able to &lt;I style="mso-bidi-font-style:normal;"&gt;resolve&lt;/I&gt; those references. Gert Drapers has a useful introduction to them at his blog post &lt;A href="http://blogs.msdn.com/b/gertd/archive/2007/07/26/database-references.aspx"&gt;Database References&lt;/A&gt;; in his words database references allow you to:&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN-LEFT:36pt;"&gt;&lt;SPAN class=apple-style-span&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:#333333;FONT-FAMILY:'Segoe UI','sans-serif';"&gt;represent and resolve 3 and/or 4-part name usage inside a database project. Database references&amp;nbsp;are conceptually the same as assembly references inside a C# or VB.NET projects; they allow you to reference objects from your database project that live inside another namespace (database).&lt;/SPAN&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;/I&gt;&lt;SPAN class=apple-style-span&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;o:p&gt;It occurred to me that similar functionality would be incredibly useful for SQL Server Integration Services(SSIS), Analysis Services (SSAS) &amp;amp; Reporting Services (SSRS) projects. After all reports, packages and data source views are rife with references to database objects – why shouldn’t we be able to have design-time dependency checking in our BI projects the same way that database and .Net developers do?&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=Apple-style-span style="FONT-SIZE:11px;FONT-FAMILY:Verdana, sans-serif;"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=Apple-style-span style="FONT-SIZE:11px;FONT-FAMILY:Verdana, sans-serif;"&gt;Here are some examples of ways in which this would be useful:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;SPAN class=apple-style-span&gt;If a SSRS report pulls data from a view, I firstly want to know (at design-time) that that view exists. Secondly, if the view definition changes I want to know that my report will still work.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;SPAN class=apple-style-span&gt;&lt;/SPAN&gt;&lt;SPAN class=apple-style-span&gt;Similarly for a SSAS cube, if a view referenced in the DSV changes or disappears I want my SSAS project build to fail or succeed accordingly&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;SPAN class=apple-style-span&gt;&lt;/SPAN&gt;&lt;SPAN class=apple-style-span&gt;Similarly for a SSIS Execute SQL Task, if it executes a stored procedure I want to know that the named parameters that I am using actually exist in the stored procedure.&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;To this end I have submitted three identical suggestions to &lt;A href="http://connect.microsoft.com/sqlserver/feedback"&gt;Connect&lt;/A&gt;, one each for SSIS, SSAS &amp;amp; SSRS:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=apple-style-span&gt;&lt;SPAN style="FONT-SIZE:8.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE:16.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';mso-fareast-font-family:'Times New Roman';mso-bidi-font-family:'Times New Roman';mso-font-kerning:18.0pt;mso-fareast-language:EN-GB;"&gt;&lt;A class="" href="https://connect.microsoft.com/SQLServer/feedback/details/597709/" target=_blank&gt;[SSAS] Declare database object dependencies&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:16.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;A class="" href="https://connect.microsoft.com/SQLServer/feedback/details/597707/" target=_blank&gt;[SSRS] Declare database object dependencies&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:16.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:16.5pt;COLOR:black;FONT-FAMILY:'Verdana','sans-serif';"&gt;&lt;A class="" href="https://connect.microsoft.com/SQLServer/feedback/details/597708/" target=_blank&gt;[SSIS] Declare database object dependencies&lt;/A&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;I have said before in my blog post &lt;A href="http://sqlblog.com/blogs/jamie_thomson/archive/2010/01/12/the-sql-developer-gap-warning-rant-coming-up.aspx"&gt;The SQL developer gap&lt;/A&gt; that we database and BI developers deserve as much love from Microsoft as our .Net counterparts do and I’m of the opinion that providing design-time dependency checking across the full gamut of BI projects would be a huge step in the right direction. The holy grail is an object dependency graph from database tables all the way up through database views, database functions, stored procedures, DAL, ORM layer &amp;amp; business logic layer all the way through to presentation – I don’t know how long it will take but we will get there one day I am sure, hopefully sooner rather than later!&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;A href="http://twitter.com/jamiet"&gt;@JamieT&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;UPDATE: This feature (i.e. the ability to define dependencies on database objects at build time) is coming to the Entity Framework as confirmed in this Connect submission:&amp;nbsp;&lt;A class="" href="http://bit.ly/igmEiS"&gt;http://bit.ly/igmEiS&lt;/A&gt;. Let's hope the same comes to SSIS/SSAS/SSRS soon.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=28755" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/Datadude/default.aspx">Datadude</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/sql+server/default.aspx">sql server</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/sql+server+integration+services/default.aspx">sql server integration services</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSAS/default.aspx">SSAS</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/ssis/default.aspx">ssis</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSRS/default.aspx">SSRS</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>The SQL developer gap (Warning: rant coming up)</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2010/01/13/the-sql-developer-gap-warning-rant-coming-up.aspx</link><pubDate>Tue, 12 Jan 2010 23:43:21 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:20975</guid><dc:creator>jamiet</dc:creator><slash:comments>13</slash:comments><comments>http://sqlblog.com/blogs/jamie_thomson/comments/20975.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/jamie_thomson/commentrss.aspx?PostID=20975</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/jamie_thomson/rsscomments.aspx?PostID=20975</wfw:comment><description>&lt;p&gt;I recently submitted a bug to Microsoft Connect concerning the behaviour of the expression language in SSRS, if you’re interested you can read about it here: &lt;a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=523703" target="_blank"&gt;DateAdd() doesn't throw an error when it has invalid parameters&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I got a swift and detailed reply (for which I am grateful) from a fellow on the SSRS team however the content of it wasn’t exactly music to my ears:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;While I do agree it would be desirable to have an error here, the SSRS engine makes use of the VB code engine for functions such as this. So, the call to DateAdd is just a passthrough as far as SSRS is concerned. The majority of the functions available in SSRS are actually just VB ones.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In other words the inequities of SSRS’s expression language are down to the frailties of a 14 year old scripting language that should have been thrown out long ago on the coattails of Crystal Reports. Am I the only SQL Server BI developer that feels a little … oh I don’t know … &lt;em&gt;unloved&lt;/em&gt; sometimes by the various BI teams in SQL Server land. Let’s have a look at some of the things that we have to put up with:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;two different expression languages (one for SSIS, one for SSRS), neither of which support comments as far as I am aware, neither of which have any debugging features and neither of which are extensible &lt;/li&gt;    &lt;li&gt;an expression language in SSRS that is based on a dead scripting language and rarely produces meaningful errors &lt;/li&gt;    &lt;li&gt;an expression editor in SSIS for which there isn’t even context-sensitive help let alone intellisense &lt;/li&gt;    &lt;li&gt;an MDX query editor in SSMS that doesn’t have intellisense &lt;/li&gt;    &lt;li&gt;a script task editor in SSIS that shows read-only system variables in the ReadWriteVariables dropdown &lt;/li&gt;    &lt;li&gt;I could go on…&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;None of these issues are particularly prohibitive on their own but when you add them all up (along with many others) I’ve no doubt that we could all be a heck of a lot more productive were they all solved.&lt;/p&gt;  &lt;p&gt;I look around at our cousins in .Net land and I see their fancy WPF code editors, extensible languages, Javascript Intellisense, code navigation shortcuts, mockable code, code style checkers, MEF-compliant IDEs, type-inferencing, 3rd-party code editors, keyboard shortcuts, modern type-safe compilers, code generation templates, meaningful error messages, proper debuggers, runtime watches, collapsable code regions, IDEs with built-in refactoring support, built-in code formatting, code documentation tools, whitespace highlighting, code performance analysis tools, LINQ, fluent this-that-and-the-other etc…&amp;#160; and I can’t help but feeling a little hard done by. (Anyone that has used Resharper for .Net will know exactly what I mean.) Am I the only SQL guy that feels like a second class citizen in the Microsoft developer ecosystem?&lt;/p&gt;  &lt;p&gt;I must be fair and admit that we have it a lot better than other database platform developers (if you have ever used any of the plethora of Oracle developer tools out there you will know what I mean) but nonetheless it would be nice to see a little bit of love go the way of us lowly SQL bods don’t you think?&lt;/p&gt;  &lt;p&gt;OK, rant over. My apologies if you came here hoping for some words of wisdom but I’ve been wanting to get this off my chest for ages; normal service will be resumed forthwith!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;P.S. A valid response to this from the SQL Server team may be “submit your ideas to Connect”. I’d like it to be known that the majority of things I have listed above have already been submitted to Connect in some way shape or form and I would be happy to supply a list if one were required!&lt;/p&gt;  &lt;p&gt;I should also apologise to the SSRS team for making an example of them – the submission highlighted above is hardly the most annoying of problems listed here but it just happened to be the one that pushed me over the tipping point to writing this!&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=20975" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/sql+server/default.aspx">sql server</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSAS/default.aspx">SSAS</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/ssis/default.aspx">ssis</category><category domain="http://sqlblog.com/blogs/jamie_thomson/archive/tags/SSRS/default.aspx">SSRS</category></item></channel></rss>