October 2008 Blog Posts

Setting the Scale in a Reporting Services Chart Dynamically

A requirement for the reporting portion of an upcoming system of mine is that the Y-axis of charts can start at 0, or a defined number, or by letting the chart decide (automatic). This, like many of the requirements for this particular system, is because of the way Excel charts work. Dynamically setting the minimum axis in a Reporting Services chart can be done by typing an expression in the "Scale", "Minimum" box (for SSRS 2005 and greater only). Note you don't have the benfit of the expression editor: In the above image I've passed the minimum with the dataset. I'm sure...

How to Demotivate a (Good) Programmer

Louis over at lbrandy has a funny-yet-serious post on "Demotivating a (Good) Programmer" (found via Delicious popular links). Here's my favorite bit: Developers hate three things, above all else, in increasing order of painfulness… Working on stuff that is easyWorking on stuff that is tangentialWorking on stuff that no one will use These are the three deadliest of deadly sins in the development world. Especially number three. Nothing will suck the life out of programmer faster than working on something he is certain no one will ever use. I don't know about you, but I totally agree with number 3. I can still remember...

Creating an 'Other' Bucket When Using PIVOT in SQL Server

The one problem when using PIVOT in SQL Server 2005 is that the values to be pivoted (aka "crosstabbed") need to be hard-coded, and if new values come along the query needs to be altered. Additionally (but unavoidably), any queries or reports that rely on the PIVOT query will also need to be altered. To address this problem, I'm going to demonstrate with a simple example how to create an "other" bucket to catch values that aren't hard-coded. But first, some code! An example I've come across frequently is when a set of codes map to columns, and at a later date...

«October»
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678