Custom IE Error Page (DNSERROR.HTM)

Monday, June 20, 2011 3:22 PM by nairdo

When you use a web based kiosk for your attendant-less check-in system, you should think about what's going to happen if your network fails you -- especially if you're using the 3G network.  This is what you'll see if the kiosk cannot reach the server:

standard error 

That page is especially problematic if you don't have a keyboard because there is no way to refresh/reload the page if the network starts working again.

Luckily you can customize this content... it's just a pain to do it but I'll show you how.  Here's what our page now looks like:


The button is a nice feature because it's basically just going to load our check-in system page again.  Without that, in the past someone would have to reboot the whole system (pressing F5 on an stashed-away emergency keyboard would have also worked).  It's also worth noting that since you can use javascript in there, you should even be able to do something more sophisticated such as automatically retry every few seconds, etc.

Here's how we did it:

  1. Download a Resource editor such as Resource Hacker. I read that it is possible to edit .mui files using VisualStudio, but after about a half hour of fail, I found Resource Hacker and it did it quite easily.

  2. Grab a copy of your kiosk's ieframe.dll.mui file (found under C:\Windows\system32\en-US\) and stow it away for backup purposes.

  3. Use Resource Hacker and edit the ieframe.dll.mui file.  Navigate down into the "23" folder (aka HTML folder) and select the DNSERROR.HTM item like so:

    Resource Hacker

  4. Make your changes.  It's just HTML, so you know what to do...

  5. Press the "Compile Script" button.

  6. Save the file and quit.

  7. Copy the file over to your kiosk's C:\Windows\system32\en-US\ folder.  If you're unable to, because the file is in use or similar, just rename the live file (oddly Windows let's you do that) and then copy the file down to that folder.

  8. Start IE and kill your network to see the result.
Is this a hack?  Of course, but it works. We're using an old version of IE, so you're mileage may vary. I'd consider switching to Chrome for our kiosks (since you can start chrome in -kiosk mode too) but I can't seem to find any information on how to customize its equivalent error page.  Let me know if you've found another way.

Patchy Philosophy and the Bug Free Software

Wednesday, June 15, 2011 8:17 PM by nairdo

bugs outnumber humans 

[note: This is an especially 'angry coder' post -- so I encourage the the faint of heart reader to simply skip this article.] 

Although I hate to admit it, I know there is no such thing as bug free software releases.  With testing and a solid QA process in place, you most definitely can drive software defects in new releases toward zero. However, the more complex the software is, the less likely it will come close to zero.  Some have argued from a business perspective it's not cost effective to even try to reach zero bugs.  Personally, I think it's your obligation to do your best to find and kill bugs before your customers do -- if you want to keep your customers and your business.

What to do?  Shall we developers simply pretend bugs don't exist and keep on creating new releases?  Certainly not.  Patches to the rescue.

When you haven't yet proven that you can release software with little to no defects, you are obligated to follow the patch principle.  Your customers are counting on it.  The idea is simple.  After you release a new version of your software (major or minor release -- any version that introduces new or changed functionality) you promise to quickly and frequently release patches for the bugs that are reported by your customers.  You must not wait until the next release because guess what...there will be more bugs in that release too. (To think that 'the next release will not contain bugs' is to misunderstand developers and software development.) You should not wait and batch them up either and you should not endlessly test the patches for weeks or even days. You create and release them -- quickly -- as your customers are broken until they've applied that patch.  They are at your mercy.  It's up to you to establish a solid, reliable patch process your customers can count on.

So, as we move into the future, I intend on pushing this same philosophy with the two open-source software projects that I'm involved with. Both of these new management systems (Grassroots and ****) will not suffer from the patchy philosophy syndrome.

Remote, Mobile, 3G, Check-in

Wednesday, June 15, 2011 7:11 AM by nairdo

the Kiosk Cart

When we launched our Queen Creek campus at the Queen Creek High School, we decided not to rely on the local network there.  Having learned our network reliability lessons when we ran a test church at Campo Verde High School the year before, we instead decided to put some trust into the 3G cellular network. So far it's been pretty solid.

Built not for looks but for quick setup, tear-down, and storage, this 'kiosk on a cart' solution was somewhat based on Daniel's "network in a box" configuration and our custom check-in Arena module.  The cart includes a self contained network using a used Cisco 800 series router with a 3G card that creates a VPN tunnel to our main campus.  If IT and Networking are your gig, you can read all the details about those parts over on Derek's blog.

If you're wondering if it's fast or even usable... check out this video of me doing check-in of some test children during a live, normal weekend.

Every time I see the labels print out with this setup, I'm amazed.  The browser on the kiosk is talking over the 3G VPN network, to our web server which is then sending a local print job to a printer called QC1 (or QC2), which in turn is defined to talk to the printer's print-server on a particular static IP back over the 3G VPN network.  Back and fourth over the 3G network without a hitch.

One more important thing to note. Notice how fast we can punch in a phone number? Unless you're using iPads or some other non-mouse/keyboard device, you might need to change your registry's DoubleClickSpeed setting. We've set ours to 50. That setting defines how clicks are interpreted by the OS, so if the number is too high the OS won't interpret two very fast clicks (screen touches) as two single clicks.

Mind Storm

Saturday, June 11, 2011 7:02 AM by nairdo

Here are a few of the things swirling around in my head that make it hard to sleep...

  • thinking about new friends I met in North Africa that live in tents (refugees) and have lost everything due to the revolution
  • having so much side work I have to turn customers away
  • emails I haven't responded to
  • still top-secret and not secret side projects such as Grassroots
  • the need to do more RefreshCache 2011 prep work
  • thinking about how to keep up with news, software tech, tweets, feeds, and friends
  • trying to figure out when we can upgrade our Arena to a newer version
  • potential security holes
  • bugs
  • bed bugs (not that I have any -- just knowing that they exist somewhere out there)
  • Quantative Easing 3
  • thinking about and publishing a list of things that are keeping me awake at night
  • recursion
Ok, they say if you just write things down that you'll feel better and can get back to work. We'll see if that works.

I'm Defeated: Community Communications

Wednesday, February 16, 2011 11:20 AM by nairdo

Community SubscriptionsI admit defeat. I can't keep up with all the community posts in the Arena community forums anymore.  Actually, I would have to say it started at some point during 2010.  I just would not admit it until today.  I guess this might also mean the.Community has become a pretty successful tool for certain things ArenaChMS!

Anyhow as a result, I'm finally changing my forum's subscriptions -- unsubscribing from about 90% of them.  I just need to keep the most essential ones... and I'm lucky I went in there.  I also just discovered several new forums for the community developers, namely the Developer Alerts forum. Perhaps that forum will be used to announce when a Arena deprecates a method from their class library API...

my developer forum subscriptions 

Using Firebug in IE

Tuesday, December 07, 2010 8:39 AM by nairdo

If you're developing complex modules for your Arena website, you'll probably need a tool such as Firebug (a plugin for Firefox) to test how your CSS changes will effect layout in the browser.  Once you've used Firebug you'll have a hard time trying to manage without it.

That's great for Firefox, but what about IE?  With Firebug Lite you can also have much of Firebug's great functionality inside IE too -- you just need to add a script reference into the "head" section of your webpage...

<script type="text/javascript" src=""></script>

If you use our custom Inject Javascript Arena module, you can have that (or any other javascript reference) put directly into the head of the HTML with a few simple module settings:

The module settings

And if you add it to your site's Arena template and only allow admins view permission to that module, it will have absolutely no impact to anyone else.  Enjoy.


** You also need to add this "bookmarklet" (Launch Firebug Lite) to your your Favorites in IE which is used to start Firebug Lite.

Jason Offutt == JSON Data

Thursday, November 25, 2010 8:40 AM by nairdo

JSON DataMy good friend and co-worker, Jason Offutt, recently started blogging over at  (Yes, not only is he a developer and an artist, he's also a great writer!)  In our spare time, Jason and I have been working on a couple of open source projects. One of them, his baby, is an MVC web application for allowing organizations to start giving campaigns w/sponsors and the other is still very young and undisclosed. The topic of open source is a frequent discussion among the guys involved in these projects and Jason just wrote a great article about open source development in the .NET world --- which is something many non-MS developers may not realize is happening.

As I mentioned at RefreshCache, it's a shame when can't utilize the tools and experience we've gained during our regular job when we continue the work of our ministry in the off hours; whether we're helping build a website for an orphanage in Nepal or writing software for a parachurch ministry.  We love Arena ChMS as application development framework, but it's not open source and we just can't use it for our other projects.

We can't control the choices of our vendors, but we can control our own actions. This is part of the reason why Jason and I are involved in these other two projects.  I'll be posting more about all this early next year.  Happy Thanksgiving!

Silence: the moral dilemma on hiding a Facebook friend

Wednesday, October 06, 2010 7:31 PM by nairdo

Facebook hidingYesterday I used the "hide" <friend> feature on Facebook and I'm torn over it.

For me, the Facebook trend had become something I dreaded because of a particular person I know who doesn't seem to have a day job other than to FB troll every day - all day. You know the type of person I'm talking about. Not the regular person who occasionally drops an agenda-based-topic into their socially acceptable narcissistic stream of consciousness. I'm talking about the super activist whose only job is to dredge up nonsense, pre-spun statistics, so-called facts and bogus "news" which they feel is going to influence the overwhelmingly silent majority of Americans.  In order to see what my other friends were up to, I'd have to wade through 6-12 other daily, inflammatory, repulsing posts from you-know-who, and after a year or so of doing this Facebook simply sickened me.

The act of FB hiding is something I've been struggling with internally for months now.  Most the people I've talked with say, 'yeah, it's fine to silence your friend, and you need to do it.'  But I can't help but feel: what's the point in calling someone a friend if you can't stomach what they have to say.  Hiding seems like a cop out - a lie to yourself.

Coincidentally, my pastor said today, 'to outright reject every detail of what someone says without measuring its truthfulness is foolish and you'll be seen as an idiot.'  While this applies to to all parties in a debate, what if only one side is being intellectually honest and reasonable?  I suppose it's only reasonable to end that debate and walk away from the unhealthy conversation.

I'm going to try it for a while and see how it goes. At least with hiding there is still some ability to participate in each others discussions, but I will definitely be mulling my decision over and may just pull the plug on the 'friendship'.

I knew something like this could happen.  It's one of the reasons why I've always been overly thoughtful about who I accept friend requests from. I don't generally think of my FB friends as simply co-workers or acquaintances.  I consider them real friends (someone I could call on for help) and I want to keep it that way.

[Note: In yet another coincidence, shortly after writing this post, Facebook announced a new version of "Groups" which could be the answer to the problem I've just described -- provided the trolls take their constant activism to their activist groups.]

Simple Deploy Tool

Friday, September 10, 2010 10:25 AM by nairdo

Even before the full release of our newly rebuilt website, it seemed like we were constantly deploying daily/hourly updates from our sprints to several of servers (UAT, Staging, etc.)... so much so that, being a Lazy programmer, I stopped what I was doing one night and wrote quick WinForms app I call Simple Deploy.

Simple Deploy Screenshot

Now I can quickly deploy a set of files again-and-again to a set of servers with a simple button click -- not that I endorse having to do this -- but now I can be lazy.  If I need to exclude a server, I just unclick the server's checkbox before pressing Deploy.

I'm not sure yet, but I'm considering adding this into the RefreshCache swag bag if others think it's useful.

The Arena Community Developer Board

Friday, July 02, 2010 8:37 AM by nairdo
the Board - NOTIn February 2007 the guys at Arena ChMS established what was loosely called the Community Developer Board (or CDB). This little known group was comprised of the Arena team (Jeff M, Steve, Mark, Alfred, etc), Jon and David from CCV, and Phil and myself from Central. Since that time a few more churches were invited to the team (Joel & Daniel: High Desert Church, Jeremy Hoff: Shepherd of the Hills, Tom Powers: Southeast Christian Church) but our charter has been roughly the same as summarized here:
The CDB’s role is to foster and grow structured development for the Arena community. To achieve this, the CDB should, among other things, create and maintain documentation that illustrates how to properly design, develop and package Arena modules for use by the community.  Additionally it should ... fulfill other needs that are essential to more efficient module development.

A few of the things the board has done:

  • help establish the.Community site
  • establish the original wiki which later moved to the official wiki
  • establish the namespace/naming standards
  • create the Arena Custom Module Developer guide (ACMD)
  • establish the monthly and yearly Arena Developer Roundtables
  • establish the module export/import feature (and applying constant pressure to make it more complete)
  • establish our original shared source repository on CVS Dude
  • establish the "My Portal" framework enabling developers to write personalization modules
  • establish consistency on various things like using the MS Ajax CDN

Although we haven't always agreed on things, we've made good progress in areas where there was consensus. (Establishing the RefreshCache tribe has been instrumental in relieving pressure in areas where we have not agreed -- more below.)

With the arrival of Mike Gold at Arena and onto the CDB, he's been reshaping how things are done at Arena and as result the CDB will be undergoing a reboot or reinvention. Regardless of the direction the CDB takes, the RefreshCache team will continue to grow in importance. On that team Arena has no responsibility -- which means they are not on the hook for anything.  This has been a real blessing for everyone. Having that kind of clarity has freed up the community to take responsibility and ownership for things that they feel are critical or important (our Manifesto).

For the most part, everyone who attended last year's event is part of the RefreshCache team. Over the past year this team has:

  • established and manage the #ArenaChMS IRC channel (Brian Slezak)
  • established the Arena Sample Server - a place where developers can setup their custom modules and try out other live modules in action
  • established our Redmine project server - the new repository (replacing CSV Dude) for hosting your code, issue tracking, wiki, etc. more... (Daniel Hazelbaker)
  • created an amazing Arena module installer (Jon Edmiston, David Turner) 
  • really beta tested each major release of Arena before its available to everyone (Austin Spooner) 
  • created the Arena Sandbox - a place where developers can test installing their modules in a clean sandbox environment (Daniel Hazelbaker)
  • taught developers essential tips and tricks for developing Arena modules (David Turner, Jeff Schinella, Jason Offutt)
  • shared vital ideas and concepts about ChMS (Jon Edmiston)

We're only about about 3 months away from RefreshCache 101010 so it's not too late to get involved on this team by signing up to attend the free event. As you can see on our Speakers page, this year we're planning on having the guys from Integrum (creators of Gangplank) stop by and chat with us about stuff they think is important. There are a few other surprises we're hoping to unload on everyone there too but it's too soon to spill the details.

Lastly, I'm serious about this:  if anyone else is out there and can't attend RefreshCache because of cost please let me know. You can stay at my house (last year we had a few people at my place -- it was great!) or I'll help find independent sponsors to help with travel costs, etc.

101010 A Developers Conference: RefreshCache

Saturday, May 08, 2010 6:28 PM by nairdo

RC 101010Last year we decided to take a little more ownership of our destiny so we created "RefreshCache," the free two day event for church developer teams that use the Arena ChMS platform.  We're doing it again, but this year we're breaking the ice with pre-event social and hack-night on the evening of 10/10/10.  (We did not initially realize it was a binary day.)

We only made one announcement on the Arena community developer forum and we already have 19 registered attendees with two (and possibly three) of the top ten largest Christian churches in America attending.  If you're looking to get plugged into the core of the Arena community developer team, the RefreshCache (RC) team is it.

We haven't locked everything down yet, but to give you an idea of what kinds of things we cover, check out last year's schedule or one of these other blog posts. Also as an added bonus, this year we're providing all registrants with early releases of a bunch of modules created by RefreshCache founding members.  These modules include:

  • Arena <-> Planning Center Online (PCO) integration.  Created by Jon and David over at CCV.  Currently being tested by Austin at NCBC.
  • TinyMCE based Advanced HTML Editor. Created by Jason O at Central.
  • CuFon Font Replacer. Use the CuFon font rendering engine instead of boring Arial, Verdana, etc on your website. Assembled by me.
  • Promotions via XSLT.  It can use a custom XSLT (for layout), inject style sheet, apply image effects, randomize, and cache.  (The 'promotions' module to end all other promotion modules.
  • and a few others...

I really hope you don't miss it -- register now.

Ignore This Book At Your Own Peril

Saturday, March 27, 2010 11:09 AM by nairdo

Rework by Jason Fried and David Heinemeier Hansson"Ignore this book at your own peril." -- Seth Godin said that about the book Rework by the founders of 37signals.  Before I even finished it, I went and ordered two copies for some friends. Everyone will benefit from reading the book, but anyone who's writing software, is running a business, wants to start their own business, is a product manager, or is managing projects, really should stop whatever they are doing and take 2-4 hours to read this book.

I've read a bunch of books on various topics over the past several years -- and while many of them are really good, I usually don't talk them up too much.  This book is 99% meat and no fluff.

I experienced so many of the things Jason and David write about but one in particular stands out to me. Meetings are toxic.  Not all meetings, but most.  When I worked at a very large Fortune 100 company, I remember getting pulled into meetings with hundreds (400-800) of others.  If you take the average salary and compute the cost of this 800-1600 man hour meeting, you're in the $20,000-$50,000 range. As my old boss, Frank Dooris, used to say, "How many pagers does a sales guy have to sell to make up for that?"

I could say so much more about this book.  It describes much of what inspired us to start our own developer conference for the Arena ChMS community developers. We're giving this book to all attendees of this year's RefreshCache conference.  I hope you or your developers can come.  We all end up hurting if you don't make it to the event, but ultimately you'll be missing out the most.

Arena Loves Twitter Too

Wednesday, February 03, 2010 8:26 PM by nairdo

Have I mentioned how much I love Arena?  Here's why - because it can do almost anything you need it to.  Let me illustrate with a small example.  I recently heard someone say 'oh, Arena can't do that yet' on the topic of integrating twitter with our website.  Not true.  There's no need to wait for a future of release of Arena.  You can easily add your favorite tweets to an Arena powered website using the XML File Transformation module.

@RefreshCache tweets as seen on (powered by Arena ChMS)

Here's how to do it in three simple steps.

1) Publish an XSLT file that transforms a Twitter RSS feed to suit your website's layout, look and feel.  I've included mine below which you can reuse or modify as you see fit.

2) Add the XML File Transformation module to a page.

3) Configure the module's settings appropriately.  For example, I'm using "" for the XML File Path and "~/xslt/Custom/Cccev/twitter.xslt" for the XSLT File Path setting.  (That XML File Path is the RSS feed for our @RefreshCache tweets.)

Ok, I'm definitely no XSLT expert -- in fact I'm an absolute bumbling n00b in this area.  Regardless, I was able to cobble something together that works.  Notice in lines 9-60 I'm falling back to my language of choice (C#) for date processing mostly because the JavaScript date parser does not like the RSS pubDate string format.  Yes, lines 63-75 are me embedding a style block directly inline.  (I know, shame on me.)  Line 78 is where I restrict the number of tweets displayed to only 5.  Lastly, lines 77-86 are the main HTML layout for the tweets. Again, you can download mine and modify it as you please.

   1: <?xml version="1.0" encoding="ISO-8859-1"?>
   2:  <xsl:stylesheet version="1.0" xmlns:xsl=""
   3:         xmlns:msxsl="urn:schemas-microsoft-com:xslt"
   4:         xmlns:cs="urn:cs"
   5:         xmlns:js="urn:custom-javascript"
   6:         exclude-result-prefixes="msxsl js" 
   7:  >
   9: <msxsl:script language="c#" implements-prefix="cs">
  10:  <![CDATA[       
  11:     public static string UXDate( string pubDate )
  12:     {
  13:         DateTime d = DateTime.Parse( pubDate );
  14:         DateTime now = DateTime.Now;
  15:         TimeSpan timeSince = now - d;
  17:         double inSeconds = timeSince.TotalSeconds;
  18:         double inMinutes = timeSince.TotalMinutes;
  19:         double inHours = timeSince.TotalHours;
  20:         double inDays = timeSince.TotalDays;
  21:         double inMonths = inDays / 30;
  22:         double inYears = inDays / 365;
  24:         if(Math.Round(inSeconds) == 1){
  25:             return "1 second ago";
  26:         }
  27:         else if(inMinutes < 1.0){
  28:             return Math.Floor(inSeconds) + " seconds ago";
  29:         }
  30:         else if(Math.Floor(inMinutes) == 1){
  31:             return "1 minute ago";
  32:         }
  33:         else if(inHours < 1.0){
  34:             return Math.Floor(inMinutes) + " minutes ago";
  35:         }
  36:         else if(Math.Floor(inHours) == 1){
  37:             return "about an hour ago";
  38:         }
  39:         else if(inDays < 1.0){
  40:             return Math.Floor(inHours) + " hours ago";
  41:         }
  42:         else if(Math.Floor(inDays) == 1){
  43:             return "1 day ago";
  44:         }
  45:         else if(inMonths < 3 ){
  46:             return Math.Floor(inDays) + " days ago";
  47:         }
  48:         else if(inMonths <= 12 ){
  49:             return Math.Floor(inMonths) + " months ago ";
  50:         }
  51:         else if(Math.Floor(inYears) <= 1){
  52:             return "1 year ago";
  53:         }
  54:         else
  55:         {
  56:             return Math.Floor(inYears) + " years ago";
  57:         }
  58:     }
  59:  ]]>
  60: </msxsl:script>
  62:   <xsl:template match="rss/channel">
  63:       <style>
  64:        #tweets a {
  65:         text-decoration: none;
  66:         color: #444;
  67:        }
  69:        #tweets span {
  70:         font-family: Verdana, Helvetica, sans-serif;
  71:         font-size: 9px;
  72:         color: #888;
  73:         font-style: italic;
  74:        }
  75:       </style>
  77:         <div id="tweets" style="padding-left:5px;font-family: Verdana, Helvetica, sans-serif; font-size: 10px; width: 500px;">
  78:         <xsl:for-each select="item[position() &lt;= 5]">
  79:             <p>
  80:               <a href="{link}">
  81:                   <xsl:value-of select="substring-after(title,': ')" />
  82:               </a>
  83:               <br/><span><xsl:value-of select="cs:UXDate(pubDate)" /></span>
  84:             </p>
  85:         </xsl:for-each>
  86:         </div>
  87:     </xsl:template>
  88: </xsl:stylesheet>

An "expert" may cringe at what I've done in there, but I really don't care.  I mostly care about the end result.

In case you're wondering, the XSLT transforms this sort of thing:

<?xml version="1.0" encoding="UTF-8"?> <rss xmlns:atom="" version="2.0" xmlns:georss=""> <channel> <title>Twitter / refreshcache</title> <link></link> <atom:link type="application/rss+xml" href="" rel="self"/> <description>Twitter updates from Refresh Cache / refreshcache.</description> <language>en-us</language> <ttl>40</ttl> <item> <title>refreshcache: #ArenaChMS comm devs - planning is underway for RefreshCache 2010! Submit your topics and discussion ideas now</title> <description>refreshcache: #ArenaChMS comm devs - planning is underway for RefreshCache 2010! Submit your topics and discussion ideas now</description> <pubDate>Wed, 03 Feb 2010 19:57:37 +0000</pubDate> <guid></guid> <link></link> </item>

...into this.  Here's a close up of the final product.

@RefreshCache tweets as seen on (powered by Arena ChMS)


RefreshCache 09: Summary

Sunday, October 11, 2009 11:47 AM by nairdo

RefreshCache 09

Wow, what a week**.  Based on the feedback we heard or saw (Josh, tweets), some blog posts we read (Joel, Brian), as well as Jason and my own observations, we can now say RefreshCache was a total success!

While each person had their favorite part, I think we're all in agreement when I say we came together because of our passion for using software technology to grow the Kingdom of God.  Each of us wants to make a difference for the kingdom and we want to use our skills to create software.  Ultimately RefreshCache was a seed; a realization that we are not limited by the speed of a vendor (as is the case with most other ChMS systems) and a kick start to working together as a community throughout the whole year.

For me, it was an honor to be able to rub shoulders with the guys that attended.  Here were some of my highlights and favorite moments:Life After Features

  • Getting to hang out with Daniel Hazelbaker from HDC and chat about check-in, subversion, CodePlex, branching, etc.  You should see the Arena WS API he created!
  • Having time to work in Visual Studio with Austin Spooner from NCBC.  Austin is Mr. Answer Man when it comes to Arena modules.
  • Having time to talk about open source and Typo3 with Brian Slezak from COR.  We're lucky to have someone with Brian's experience on our team. 
  • Getting owned by David Turner in a few rounds of Halo ODST and learning about the Voracity Solutions package installer.  This guy is skilled with Visual Studio and the Rocket Launcher.
  • Getting to see the work of Tom Powers, Josh Martin, and Maxim Strelsov from Southeast Christian.  These guys are pretty new to Arena but they're already creating great stuff.  I can't wait to see what they tackle next.
  • Talking with Joel Lingenfelter from HDC about coffee and all things ChMS.  He has to be the most gifted CFO I've ever met!
  • Chatting with Michael Speers and Eric Byrd from Shadow Mountain.  Thanks to their questions, they spurred on a mini "check out the features right under your nose" session.
  • Getting to hear from Central's own Jason Offutt on JSON, SOA, and jQuery.  Jason's an engineer and an artist!
  • Listening to CCV's Jeff Schinella on Semantic Web, CSS and XSLT.  We all need to put his lesson into action.
  • Hearing Jon's closing presentation on "Life After Features" some of which is touched on in his blog. and David's blog on eRA.  Jon is a visionary and always seems to be 2 steps ahead of everyone.

For you Arena community developers who missed this year's event, you need to join us on IRC channel #ArenaChMS if you want to plug into this group of guys. Like I said at R.C., we are all going to see the rediscovery of Internet Relay Chat once the Google Wave hits -- albeit in a newer, easier to use form.

To correct the record, I'd say that Mark Miller was the actual inspiration for RefreshCache.  Mark is a creative cinematographer/director genius and due to unforeseen events he had to bow out from the planning of RefreshCache early this summer. Hopefully we'll have someone of his caliber to kick next year's RefreshCache into the event-execution stratosphere.  Also thanks to Mark we have the only clear picture at RefreshCache (showing a handful of people).

Lastly, I just want to publically thank Kim Musgrave, Liz (my wife) and especially Jason Offutt who picked up the tasks when we lost Mark Miller, because without him RefreshCache 09 would not have happened.

** For anyone that though I was kidding, I crashed at 7pm on Thursday night and slept for 13 hours.

SSRS, SQL 2005 and Parameterized TOP

Wednesday, September 30, 2009 10:47 PM by nairdo

I was writing a query for Reporting Services (SSRS) and I really wanted to use a parameter to allow the user to choose how many of the "top" results should be retrieved/shown.  With SQL Server 2005, the TOP expression is now parameterized however attempting to use it in an SSRS dataset like this:

SELECT TOP ( @topN ) p.person_id, p.first_name,p.last_name
FROM core_person p WITH(NOLOCK)
ORDER BY p.last_name

only gave me this error:

SSRS Error

Rats!  It should have worked.  My @topN parameter is properly defined as a Report Parameter of type Integer with a default value of 20.  

Looking around I found a lot of complicated ways around the issue some of them involving creating dynamic statements and such like this one (link).  Way too complicated for me and I hate dynamic SQL -- I just say NO.

It turns out with a little creative oob thinking you can just trick SSRS by declaring another variable in your dataset and then setting it to the value of your Report Parameter like this:

DECLARE @NewTop int
SET @NewTop = @topN

SELECT TOP ( @NewTop ) p.person_id, p.first_name, p.last_name
FROM core_person p WITH(NOLOCK)
ORDER BY p.last_name

Problem solved.

Powered by Community Server, by Telligent Systems