Monday, November 22, 2010

Change axis font in Excel 2007

Want to change the axis font in your Excel 2007 chart, and can't find it anywhere in the Format Axis window? Just click the axis and then use the toolbar items to change it just like you would any other cell.

Sunday, October 3, 2010

Kudos for Customer Service done right

I've had a good string of excellent customer service experiences lately, so I thought I'd take a moment to recognize these companies for a job well done:

Netflix
About 6 months ago we conceeded that we had officially lost a movie, so we paid the $15 so they would send us the next movie in our queue.  At the time they informed us that if we found it within a year, we could return it and they would credit the amount back to us.  Well sure enough, a couple weeks ago I was moving furniture and there it was.  I shoved it in the return envelope along with another movie, shipped them off, and the credit was immediately applied to our card with no other action required on our part.

Lowe's (Rogers, AR)
We bought a replacement faucet for the kitchen sink in our rental house. When we opened the box to install it, a piece was missing, so we took it back and exchanged it for another box no problem. We got that one installed but it wasn't sealing properly and water was spraying all over. We removed the pull-out handle and associated parts and took it back. We got a 3rd box, opened it up in the store, and realized it was also missing a piece, though not the one we needed. Lowe's basically allowed us to rifle through the box, swapping out the pieces we needed until we had a functional set. We took it home, and in 5 minutes had the job finished and everything working great.

(On a side note, I think somebody over at the Moen plant needs to step it up in quality control.)

Definitive Speakers / Best Buy
About 4 years ago, Christie and I bought a home theater system from Best Buy, including 2 Definitive brand tower speaker units with built-in sub-woofers.  A month ago one of them started acting up, producing a lot of interference-type static, even when the TV was off. I took it up to Best Buy to see what my options were on a repair. It turns out that the speakers carry a 5 year manufacturer's warranty. Best Buy sent it back to Definitive, who determined that the amp and woofer were blown. They replaced them and shipped it back to me in about 2 weeks, and it didn't cost a dime. Wow - now there's a company that knows how to stand behind their product.

Trend Micro
A great example of a company who had some hiccups and still created a positive experience through good customer service. My internet security and virus subscription expired, so I renewed online. They sent me an updated program install to run. However, installing it on my Windows 7 box gave me an error that it was not compatible with that version. Clicking the "search for solution" button took me to a page on Trend's site stating that to resolve the issue, they were offering a free upgrade to their newer product, which solved the problem. However it didn't recognize my updated subscription and said I was expired. I went on their site to use the "chat with a tech" feature, and within 2 minutes they had the issue resolved and I was up and running.

Thanks to these companies and the helpful staff - I am a loyal customer because of it!

Tuesday, September 28, 2010

ASP.NET Gridview - Group Header Rows and Export to Excel

I'm working on an ASP.NET portal project that has 2 very common blocks of code in it, but could not find good information on integrating these two together.

First I need to great a group header row on my gridview to collect related columns together. A typical example is to create a gridview with headers like this:

Group 1Group 2
CountAmountCountAmount

This can be accomplished in the GridView's DataBound event and adding the extra row above the header. A typical code example can be found here.  So far so good.

Of course, our users also want to be able to export the results of these grids to Excel. Again, a very common task. An example of implementing this code can be found here.

The only problem comes when you try to use both. The grid looks great on your webpage, but when you export it to Excel, you only get the original row from the designer - not the new group header row.  The other day I decided to get to the bottom of this.

The export class pulls the header information from the gridview through the HeaderRow property. As the name implies, it only returns a single row. So I went exploring through the various properties of the gridview to see what else I could find.

The code that adds the group header is based on the premise that gridview.Controls[0] can be cast as a Table to get the table representation of the entire grid. A table of course contains a collection of Rows. Now each row has a property on it called TableSection, which is an enumerated type with values TableHeader, TableBody, and TableFooter. However, I found something interesting: the rows created by the default gridview all have the TableSection property set to TableBody - even the header row.

I decided to exploit this in my code. In the DataBound event, before adding my new row to the header, I simply set the TableSection property to TableHeader:

if (t != null)
{
row.TableSection = TableRowSection.TableHeader;
t.Rows.AddAt(0, row);
}

This allows my new header row to be differentiated from the default header. I use this to identify the row in my export to excel class:

if (gv.HeaderRow != null)
{
// Check for extra header rows created
Table GridAsTable = (Table)gv.Controls[0];
if (GridAsTable.Rows[0].TableSection == TableRowSection.TableHeader)
{
GridViewExportUtil.PrepareControlForExport(GridAsTable.Rows[0]);
table.Rows.Add(GridAsTable.Rows[0]);
}

// Now add the "normal" header row
GridViewExportUtil.PrepareControlForExport(gv.HeaderRow);
table.Rows.Add(gv.HeaderRow);
}

Of course, this code only allows one additional header row to be exported - if you have need for more simply loop through the Rows and find all those flagged with TableHeader.

In the end I found this was a very simple solution to the problem, and my users can now see the column group titles when exporting to Excel.

Sunday, May 23, 2010

Leadership Benton County

On Thursday I will graduate with the Leadership Benton County class of 2009-2010. I was honored to be selected to participate in this year-long program, and thoroughly enjoyed the experience.

The Leadership Benton County program is hosted by the 3 local Chambers of Commerce: Rogers/Lowell, Bentonville/Bella Vista, and Siloam Springs. The goal of this program is to provide leadership training for future community leaders.

The program runs from August until May, and requires a commitment of a full day per month, plus a 2½ day trip to Little Rock. We spent some time at the Soderquist Center for Leadership and had monthly sessions to learn about our community on topics such as Human Services, Education, Tourism, Economy, State and Local Government, and Humanities. We were given the chance to visit numerous businesses and organizations in Benton County and meet with a diverse group of community leaders.

I gained a great deal from participation in the program. If I had to pick the one single thing that stands out, I would say that it is the recognition that leaders are not fundamentally different than anybody else - they simply choose to get involved and lead.

I would encourage anybody with an interest to get involved. For more information on the program, click here.

Sunday, May 9, 2010

Replace $1 bill with $1 coins

The United States has been trying to get a $1 coin circulating for at least 30 years, since the introduction of the Susan B. Anthony dollar in 1979. Every attempt has failed for one simple reason: we are still making $1 bills. As long as the bills are available, the public will not convert to $1 coins.

There is a very strong, obvious reason to convert to coins: COST! Let's look at the details.

The US Government spends about 7.5 cents to create a one dollar bill, according to the US Bureau of Engraving and Printing (BEP). By comparison, the cost of creating a dollar coin is 16 cents, per the US Mint annual report, page 32.

However, a dollar bill only has an average life of 21 months in circulation, per BEP. By comparison, the average life of a coin is 25 years, per US Mint. So for twice the cost we can produce a product that lasts 14 times as long. That sounds like easy math to me.

To confirm this point, according to the BEP website (same page as above), an astounding 95% of all bills printed are to simply replace circulating notes.

In 1995, the Congressional Budget Office urged Congress to consider this option. At the time it was projected that over the following 5 years it would save $100 million dollars. According to the US Mint, a report by the General Accounting Office in 2002 revised this estimate to $500 million dollars.

Is it just me, or does this seem like a really easy decision? What are we waiting for?

And if you still aren't convinced, the next time it takes you a dozen tries to get the Coke machine at work to accept your wrinkled up dollar bill, just think how much easier it would be if you had a $1 coin in your pocket!

Thursday, May 6, 2010

ASP.NET and AJAX Incremental Page Loading

I had been searching the internet at work this week for a good example of using AJAX to do an incremental page load. As often happens, I just couldn't quite find the right page, though I found a promising video which I was not able to watch at work. I finally got a chance to watch it tonight and it provides a perfect, simple walk-through of implementing this. See the video here.

The only thing I didn't like in the example was that each call used a different success function. What I wanted was a page that would report statistics back on multiple tables, and incrementally display the results as they came in. My webservice would accept the table name as a parameter and return a string containing the results. But if I had 20 tables, I didn't want to have 20 success functions.

With a little more searching, I discovered that when you execute the webservice, you can add an additional parameter at the end for user context, which is an arbitrary string that is passed along and sent to the success function. In my case I passed along the name of the div I wanted it to update, so a single success function could insert the results into the correct location. Here is the code:

function pageLoad() {
WebService.GetInfo("Table1", OnComplete, OnError, "Div1");
WebService.GetInfo("Table2", OnComplete, OnError, "Div2");
WebService.GetInfo("Table3", OnComplete, OnError, "Div3");
WebService.GetInfo("Table4", OnComplete, OnError, "Div4");
WebService.GetInfo("Table5", OnComplete, OnError, "Div5");
}

function OnComplete(result, divname) {
document.getElementById(divname).innerHTML = result;
}

Monday, March 29, 2010

Why the latest polls on health care don't mean anything

I felt compelled to comment on an article I read today in USA Today, declaring "Public almost evenly divided on health care law" based on a new poll that shows that 50% call passage of the bill "a bad thing" and 47% say it was "a good thing.". The article can be found here.

Let me say up front: I am not picking on USA Today, and this is not a blog about politics - it is about polls. So let's look at the numbers.

According to the article, the poll asked 1033 adults, and they claim that this sample is statistically representative of the entire country's opinion within 4% points.

The current population is 307,000,000, according to public data. [1]  So this poll represents the opinion of 0.000336482% of the population. Personally, that doesn't sound very representative. Too many zero's in that number? Let me express it another way.

To determine the opinion of the country, they asked 1 out of every 297,000 people. So using these statistics, I could go to New York City and ask 27 random people their opinion, and have a statistically accurate representation of what everybody in NYC believes. Bringing that closer to home, I would only have to ask a single person in all of Northwest Arkansas to know how our region feels.

Opinions vary by what part of the country you live in, so let's assume they called people from every state. With only 1000 people total, they could have only called 20 people from each state. How do you feel about the idea that 20 random people from your state accurately represent the sentiment of your entire state?

To get a valid opinion of the country as a whole, I would think they would have to ask people from various demographic groups. To keep this simple, I am going to assume that this very short list represents a complete sampling:
  • Gender: Male or Female
  • Marital Status: Married, Single, Divorced
  • Employment Status: Student, Hourly, Salary, Self Employed, Unemployed, Retired
  • Income: Assume 6 levels of income ranges
Now let's say that a complete sample could be accomplished by asking only ONE person in each combination of demographics per state. This would require asking 216 people in each state, or 10 times what was done in the USA Today poll.

One last thought. The article also pointed out that the survey was done to both land lines and cell phones. This is in response to recent complaints that younger and/or more technically savvy people do not have land lines, and therefore surveys that only use land lines are inherently skewed. So USA Today is trying to show that this was not an issue in their survey. But who these days is going to answer an incoming call on their cell phone from an unknown or blocked number? Does this really prove that they are reaching just as many college students, young active professionals, single moms, and third shift workers as they are reaching other groups like retired senior citizens?

This is why I do not pay any attention to polls like this, except to always read the footnotes. In the mean time, there is definitely a lesson to learn here: if you ever get asked to take a poll, DO IT, because your opinion will be counted as 300,000 people!

Thursday, March 11, 2010

Infrastructure and Economics - a local view

Last month in my blog about high speed rail, I made the point that through our country's history, investment in infrastructure has been followed by economic growth. Today at Leadership Benton County, I had the opportunity to hear the mayors of Rogers and Lowell talk to our group, and couldn't help but notice that theme in what each of them had to say.

At the Rogers City Hall, Mayor Steve Womack gave an excellent talk about where Rogers has come from as a city and where we are today. He talked about the city's history as a bedroom community that spent much of their tax dollars in Fayetteville. However, throughout the 90's it was clear that the population of Benton County was growing faster than Washington County and would one day surpass it. As the mayor said, "Retail follows rooftops", so the city made a strategic decision to invest in infrastructure on the west side along the I-540 corridor to be prepared. Benton county did overtake Washington county in about 2002, and the west side corridor is now home to Pinnacle Hills mall, Village on the Creeks, Wal-Mart, John Q Hammons, Embassy Suites, and much more. This development continues to have a significant impact on city funds that come from sales tax revenue, and has positioned Rogers in better financial condition during the economic downturn than any other city in NWA.

Lowell is a much smaller community, with a current population of about 7000 people. But Lowell is actively positioning themselves as a great place for business because they are at the crossroads of NWA. In a separate session at the Lowell City Hall, Mayor Long and Director of Planning and Economic Development Michael Solomon both cited investment in infrastructure as the key strategy to attracting new businesses. Current projects include the extending of Dixieland Road from the city line (by Fastlanes) down to 264, and significant extensions of the sewer system.

In both of these cases, you can see direct evidence right here in our own backyard that a smart plan of investment in infrastructure today can yield significant economic paybacks in the future.

Monday, March 1, 2010

Social Networking for Business and Organizations

I have had several conversations over the past year with people wondering how to use social networking sites like Facebook and Twitter for their business or organization. It was not so long ago that we saw the web go from something cutting edge to "What do you mean you don't have a website?". Today, with the speed at which social networking has developed, nobody wants to be left behind. If you are trying to figure out how to jump in, here are some thoughts.

Have Something To Say

Social sites are a platform, so don't step up to the microphone and just stand there. Every organization has a message: a business has products or services to promote, non-profits need to increase awareness of their mission, and groups have news and activities to announce. Figure out what your message is and these sites can become a great way to get it out!

Have Something WORTHWHILE To Say

This is the real key. Ask yourself: Why should somebody follow you? What do they have to gain? What benefit can I provide?

If I am following your business, I am going to expect to see information about your services, new product launches, special promotions or events. You might also include information about your industry, interesting facts, or helpful tips, which identifies you as an expert in the field.

A non-profit organization might put out information on upcoming events, fundraisers, and volunteer opportunities. Since your followers are either current or potential donors, publishing info about accomplishments, milestones, and stories of how you are being successful are great ways to show that you are achieving success and are worthy of their support.

Groups can use social media very effectively by posting dates, times, and locations of meetings, especially when there are last minute changes. Posts can also discuss speakers, workgroup topics, and agendas.

Examples of Effective Social Media Usage

My friend Joe Chumbler, and his company, Boston Mountain Money Management, are in the investment and financial services industry here in Northwest Arkansas. Because of Wal-Mart, there is a very large concentration of retail suppliers in this area. Joe and his partner identified a way to serve this community and created the Northwest Arkansas Wal-Mart & Supplier Newsletter. Published monthly, the newsletter contains news and insights into the CPG industry, and is available on their blog, LinkedIn group, Facebook page, and via email. As I write this, they have over 2000 monthly subscribers, and have created great visibility for their company.

Seven Hills Homeless Shelter uses their Facebook Page to regularly post volunteer opportunities, announce donations, and post pictures of activities to keep their followers engaged in the daily work they do.

LinkedIn uses their Twitter account to post articles about using their website to the fullest and announcing new features. This is also a great way to engage users. LinkedIn has 60 million users, and yet I have interacted directly with the company via Twitter, asking questions and providing feedback regarding features on their site.

Of course, Microsoft has nearly unlimited resources, but their Facebook page for Office demonstrates how sophisticated a fan page can be, with a great deal of dynamic content.

I hope these ideas will get your thinking about how your own business or organization can make effective use of social media sites!

Monday, February 15, 2010

Change Windows 7 logon image

Windows 7 provides a simple way to customize the logon image. Here is the short-and-simple solution:
  • Run REGEDIT and navigate to:
HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background
  • Change the OEMBackground key from 0 to 1.
  • Now go to the C:\Windows\system32\oobe folder.
  • If not present, create a folder here called info, and then a folder under info called backgrounds.
  • Copy your jpg file to this folder and call it backgroundDefault.jpg. This file must be less than 256K.
That is it! Now you have a custom windows logon background.

I found this info at the following blog post. For more information, including support for multiple files in this folder for separate screen resolutions, see the original blog post at http://www.blogsdna.com/2698/you-can-customize-windows-7-logon-background-officially.htm

Friday, February 12, 2010

Upgrading from Windows XP to Vista to Windows 7

This blog post shares my experience with upgrading my desktop PC from Windows XP to Vista to Windows 7.

From XP to Vista
Last fall I picked up a copy of Windows Vista Ultimate. Since my computer was a few years old, I decided to wipe it clean and install from scratch. This would mean reinstalling all my apps, but I liked the idea of cleaning out 3 years of accumulated junk. I backed up my files, migrated my email over to my laptop, and was ready to go.

I had a very smooth experience reloading the OS. It was also shockingly fast. The entire process didn't take an hour and I was up and running without a hitch. Reinstalling everything took some time but was also problem free. Once I was up and running, I was very happy with the experience and pleased with Vista. I would definitely recommend the start from scratch install for everybody that is up for it.

Vista to Windows 7
So now 6 months later, I'm anxious to try Windows 7. Since I wiped my drive clean not long ago, I thought I would do the upgrade option and see how that compares.

Windows 7 comes with a nice pre-install compatibility checker that tells you what to watch out for, what to update first, and what to uninstall and reinstall. After taking care of a my to-do list, I lauched the upgrade. It quickly became apparent that this was not going to be the blazing fast install I had experienced with Vista. Of course, doing an in-place upgrade is a much more complicated affair.

After the initial setup and copying files phase, it rebooted my system and came up in a low-resolution mode to do the next step. I started to wonder when several times I peeked in on my computer and it still said Expanding Files... 21%. A quick google search on the laptop confirmed this is common, and sure enough, next time I looked it had moved on. So if you are reading this blog post and stuck at 21%, don't worry - just go get yourself your favorite cold beverage. From a restaurant. Even if they have slow service. All kidding aside, the entire process took a few hours, but it completed without any problems.

The pre-install compatibility check warned me that SQL Server 2008 might not be compatible and suggested uninstalling it. After reading a couple blog posts, I decided to imploy a well-used IT pattern: "Ignore it and see what happens". I did already have SP1 installed. When I logged in for the first time after the install, SQLServer services fired up automatically and I was able to run the management studio and connect to my databases with no problem.

The upgrade automatically kept my printer sharing settings, but the share of my public folder was gone. I had to reshare that drive for my wife to have access again from her laptop.

All in all, it appears to have been another successful upgrade. I will likely blog about my experience in using Windows 7 in a separate post after I have had a little more time to use it on a daily basis.

Wednesday, February 10, 2010

High Speed Rail in America

The other night I saw a pretty compelling documentary on PBS called Blueprint of America. The film focused on the city of Detroit as a case study in transportation issues. In the middle of the 20th century, Detroit invested heavily in auto transportation at the expense and eventual demise of other mass transit options.

During the documentary, a point was made that I believe is of strong relevence for us to consider today: History shows that major invenstments in national infrastructure initiatives have been followed by economic growth. Consider these examples:
  • The Erie Canal built in the early half of the 1800's provided a connection between the eastern seaboard and the Great Lakes. The video credits the canal with a tremendous growth of the city of Detroit, which now has better access for exchanging goods with the east coast. Once complete, transportation costs were reduced by 95%.
  • In the mid-1800's, the focus shifted from ships to trains, and the development of the railroad system and the completion of the transcontinental railroad in 1869 were major drivers of the industrial growth that followed.
  • In the mid-1900's, the focus was now on the automobile, and President Eisenhower spearheaded the Interstate Highway project, creating a network of highways connecting the nation that was the envy of the world. Once again, this invenstment in infrastructure drove economic growth, facilitating over-the-road transportation as well as our own individual ability to travel across the country.
And now here we are today, 10 years into the 21st century, trying to climb out of the worst economy since The Great Depression, and facing serious challenges regarding climate change, a seriously handicapped automobile industry, and a strong need to reduce our dependency on oil. Certainly these our complex issues that will not be addressed with a single solution. But as we as a country look at transportation, I believe it is time for the next big focus shift and consider what a post-automotive transportation strategy looks like. And I believe if looks like the rebirth of something from our past: RAIL!

High-speed rail is a transportation model that has already been proven to be successful in multiple places from Europe to Asia. High-speed rail provides benefits in terms of energy, safety, the environment, and efficiency. I am excited to see our president embracing this idea and moving forward with a national plan. I think this quote by him sums it up:
"As all of you know, this is not some fanciful, pie-in-the-sky vision of the future. It is now. It is happening right now. It has been happening for decades. The problem is that it has been happening elsewhere - not here."

Links for further consideration:

Tuesday, February 9, 2010

Let the blogging begin!

I have thought of starting a blog for quite some time, and finally decided to do it. Why blog? I thought it would be a great outlet for all my various thoughts and ideas that can't be compressed into a single Facebook status post or tweet. Surely the world has been waiting to hear all of them, right?

Blogging is the modern day dairy or journal. Not that I actually have any of those. I'm just saying... I like the idea of having a forum to record and share my thoughts. Hopefully some of you will also find them informational, thought provoking, funny, or insightful.

What will I blog about? The same things I post on social networking sites, but in more detail: technology, my job - or these days the search for one - Northwest Arkansas, community involvement and volunteering, transportation, tennis, my family, and who knows what else.

Please take advantage of the ability to comment on my posts and let me know if something was meaningful or worthwhile to you!