ReportViewer doesn’t take full width in Internet Explorer

I’ve been struggling with an issue with a ReportViewer control in an aspx page for a while now, and finally dedicated some time to getting it resolved.

My control looks like this:

rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="1em"
          ProcessingMode="Remote" AsyncRendering="False" SizeToReportContent="True" ShowBackButton="True"
          EnableViewState="True" Width="100%"

 

With these attributes, the report displayed correctly in Firefox, but not in Internet Explorer 9. There was a small area to the right of the report body that the report wouldn’t expand into. I’ve seen this reported elsewhere such as this stackoverflow topic.

Here’s what it looked like:

Comparison of width
Firefox display vs. Internet Explorer display

 

After digging a little deeper with the developer tools, I’ve found that the report body is broken into two cells in a table.

The first has a unique identifier, with no width specified. The second has a width of 100%, but is empty. It’s this empty TD that is causing the space:

HTML code showing the problem TD

For some reason Firefox ignores width on the second TD, but IE gives it space.

I wasted a lot of time trying to use javascript, report server attributes and c# code to get rid of this, but finally discovered an easy way to fix it using CSS.

That first TD uses a unique identifier, but always ends with “oReportCell”. So I used wildcard CSS selectors to give it a width value:

 td[id*='oReportCell'] {width:100% !important;}

 

Now the width appears correctly within IE!

VMware Server Bridged networking not working

I recently had a problem where I restarted a server that is running VMWare Server 2, but when the server came back up, there was no network connectivity for any of the virtual machines.

 

At first I began troubleshooting within the VM itself, thinking it was something to do with Ubuntu on the VM’s I have. This didn’t produce any results, but I did notice the VM could reach the host IP, but not outside the host.

 

Eventually I discovered that the vmnet0 had bound itself automatically to one of the physical adapters on my server, rather than the Team adapter that is set up through our Broadcom NIC’s.

To resolve this, you need to make sure that vmnet0 isn’t auto-bound.

In the Start Menu, under VMWare, open “Manage Virtual Networks”.

Turn off automatic binding:

 

And then manually bind vmnet0 to the proper interface:


After applying, you should see connectivity return immediately.

 

Thoughts on Windows 8 and user privileges

Windows 8 Metro start screenThe Windows 8 developer preview has been shown and released (although I have yet to find time to get it installed), and if you haven’t seen it yet, go watch the keynote at the Build conference here: http://www.buildwindows.com.

 

I’m looking at this less as a home user, and more as a system administrator for an office-based company of 350 people. Overall I’m very excited by some of the things shown, and think that it will be an immediate upgrade from Windows 7 as we bring in new computers.

Built in anti-virus is a great addition, and if the updates come via WSUS then it may finally be time to shrink our Symantec license count. The additional tools and functionality Windows Explorer, including the ribbon and file copy changes look really nice, and shouldn’t be too difficult to train users on.

I won’t repeat every feature that I’ve seen so far, but there are two things concerning me:

 

  • With the new hybrid sleep/hibernate power model, when will group policy computer settings be applied, and will putting the computer into this mode constitute a log off?We rely on our group policy objects for many things, including program installations and keeping various applications up to date. If one needs to wait until Windows Updates are done to force a real reboot (once a month based on Microsoft’s update schedule) that is an awful long time to go before GPO processes new changes.
  • I was really hoping Microsoft would revamp the permissions model within Windows, to allow program installs without Administrator rights.As more and more of our workforce get familiar with Windows and its programs, or even have grown up their entire lives using it, those people expect more control over their computer due to that familiarity. While it has always been recommended to lock down users to standard accounts for security and to ensure un-authorized programs are not installed, we are quickly entering a world where this will no longer be acceptable, due to the large amount of users who balk at the idea of control being taken away.

    Ideally what I would like to see is the Power Users local group brought back, but made better. Standard users would remain devoid of many privileges, and UAC would prompt for elevated credentials if required. Administrators would retain full control over all aspects of Windows, but these rights would only be granted to IT staff.
    Power Users would have the ability to install programs, and that’s about all. No ability to make permission changes, can’t change user accounts or rights, and are still prompted by UAC for elevated credentials when trying any of these things.

    This would give those who are comfortable with Windows the ability to install programs if necessary, as well as give IT the ability to assign programs through GPO and have it actually work without requiring Admin rights.

  • The last thing that would make my life (and our upcoming help desk staff) much easier would be the ability to unlock a user account as an Administrator, or even log into a different user’s profile with Administrator credentials.Lets say John Doe is logged on, and submits a ticket to the help desk for a problem only experienced with his profile. IT goes to that user (or remotes in) and finds the computer locked, with John no where to be found. The solutions to this are to keep a list of John’s passwords, or wait until he returns, neither of which are good solutions.

    It would be better if that IT staff remotes in, see’s the computer is locked by John, and unlocks it with their own account, getting into John’s profile. IT is already trusted with the keys to the organization, so its not like there is a security issue with this model.

 

I guess these last two things don’t really have much to do with Windows 8, but they were on my mind as I watched the keynote.

 

 

Create a discussion board for Mindtouch wiki

A recent comment on my Mindtouch intro page asked how I built the discussion board.

I originally got the code from the Mindtouch Developer site here, however I can’t seem to find the complete source code anymore. Either way, I’m pretty sure neilw, a valuable contributor to the Mindtouch community is the author of this code and full credit goes to him.

The actual implementation is very simple. You just need to make a couple of templates.

First, create the discussion board page template, or topic list:

Template:/ForumTopicList

 
<div block="var homepath=(args.path ?? '/Forum_Topics');
if (homepath[0] == '/') {
let homepath = page.path .. homepath;
}">
	<p>{{wiki.create(&quot;Create New Topic&quot;,homepath,(args.template ?? &quot;ForumTopic&quot;),true,&quot;Put Your Title Here&quot;)}}</p>
	<table block="var homepage = wiki.getpage(homepath);
    var empty = true;
    if (homepage != nil) {
    let empty = (#homepage.subpages == 0);
    }
    var topics = [];
    if (!empty) {
    foreach (var p in homepage.subpages) {
    var entry = wiki.page(p.path);
    var originator = entry['//*[@id=\'ForumEntryOriginator\']'];
    if (xml.text(originator) == nil) { let originator = web.link(p.author.uri, p.author.name); }
    var lastAuthor = p.author;
    var lastDate = p.date;
    var lastChange = string.contains(p.editsummary, 'page created') ? '(new)' : '(E)';
    if (#p.comments != 0) {
    var lastComment = list.reverse(p.comments)[0];
    if (date.isafter(lastComment.date, p.date)) {
    let lastAuthor = lastComment.author;
    let lastDate = lastComment.date;
    let lastChange = '(C)';
    }
    }
    let lastAuthor = web.link(lastAuthor.uri, lastAuthor.name);
    let lastDate = date.format(lastDate, 's');
    var sticky = (p.tags.sticky != nil ? 'STICKY!' : '');
    let lastDate = (sticky != '' ? 'z' : 'a') .. lastDate;
    let topics ..= [ { page:p, originator:originator, author:lastAuthor, date:lastDate, change:lastChange, sticky:sticky } ];
    }
    let topics = list.sort(topics, 'date', true);
    }" border="1" cellpadding="4" cellspacing="0" class="table">
		<tbody>
			<tr>
				<th style="width: 55%" valign="top">Topic</th>
				<th style="text-align: center; width: 10%" valign="top">Starter</th>
				<th style="text-align: center; width: 5%" valign="top">Replies</th>
				<th style="text-align: center; width: 25%" valign="top">Last Comment(C) or Edit(E)</th>
				<th style="width: 5%" valign="top">Views</th>
			</tr>
			<tr class="{{__count % 2 == 0 ? 'bg1' : 'bg2'}}" foreach="var t in topics" if="!empty">
				<td valign="top"><font size="1" style="font-size: 16px"><strong><font style="color: #598527; font-size: 10px">{{t.sticky}}</font> {{web.link(t.page.uri, t.page.title)}}</strong></font><br />
					&nbsp;</td>
				<td style="text-align: center; vertical-align: top">{{ t.originator; }}</td>
				<td style="text-align: center; vertical-align: top">{{#t.page.comments}}</td>
				<td style="text-align: center" valign="top"><font style="font-size: 12px">{{date.format(string.substr(t.date,1),'yyyy-M-d H:mm');' '; if (t.change != '(new)') { 'by '; t.author; ' '; } t.change; }}<br />
					</font></td>
				<td style="text-align: center" valign="top">{{t.page.viewcount}}</td>
			</tr>
			<tr if="empty">
				<td colspan="5"><font style="font-size: 14px"><strong>(no topics yet)</strong></font></td>
			</tr>
		</tbody>
	</table>
	<br />
	&nbsp;</div>

Then call this template somewhere on your page, with this:

{{ template("ForumTopicList") }}

Now, you need to create the template for the actual new topic post:

Template:/ForumTopic

<table border="0" cellpadding="5" cellspacing="0" style="border-bottom: black thin solid; border-left: black thin solid; background-color: #eeeeee; width: 100%; border-top: black thin solid; border-right: black thin solid">
	<tbody style="vertical-align: top">
		<tr>
			<td>Created by <span id="ForumEntryOriginator">{{ edit: web.link(user.uri, user.name) }}</span> on {{ edit:&quot;{{ save:date.now}}&quot; }}<br />
				&nbsp;</td>
			<td style="text-align: center; vertical-align: top"><span style="color: #598527; font-weight: bold">{{ if (page.tags.sticky != nil) { &quot;STICKY&quot;; } }}</span></td>
			<td style="background-image: none; text-align: right; vertical-align: top">{{ web.link(page.feed, &quot;Track this page&quot;) }}<br />
				&nbsp;</td>
		</tr>
	</tbody>
</table>
<p>&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<table border="1" cellpadding="5" cellspacing="0" class="comment" style="background-color: #ffdddd; border-collapse: separate; vertical-align: top">
	<tbody style="vertical-align: top">
		<tr>
			<td style="width: 100%">
				<p><span class="comment"><font style="font-size: 21px"><strong>Instructions:</strong></font></span></p>
				<ol>
					<li><span class="comment">These instructions will only appear while you are editing.&nbsp; No need to delete them!</span></li>
					<li style="font-weight: bold"><span class="comment">Please enter your Subject in the title above.</span></li>
					<li><span class="comment">Enter the content of your message in whatever form you like below.</span></li>
					<li><span class="comment"><span style="font-weight: bold">Adding comment: </span><em>If you're not the original creator of this topic, please reply by using the &quot;Add Comment&quot; field at the bottom of the page. </em>The comment added will be tabulated in the &quot;Reply&quot; field.<br />
						&nbsp;</span></li>
				</ol>
			</td>
		</tr>
	</tbody>
</table>
<p>&nbsp;</p>
<p>&lt;enter your topic message/description here&gt;</p>

You can modify this template to include whatever instructions you like.

That’s it! To create a new topic, navigate to the page that you call the ForumTopicList template, and click the “Create New Topic” button:

When others comment on the page that’s created, it will count as “replies” and show in the topic list.

Thoughts on my career path

A post by Ned Pyle was just released on the AskDS blog, which is excellent and should be read immediately:

http://blogs.technet.com/b/askds/archive/2011/09/02/accelerating-your-it-career.aspxLadder image from www.sxc.hu

Reading through this got me thinking about my own career, my abilities and attributes. I consider myself good at my job, and invaluable to my company, but reading pretty much anything by Ned or other respected IT personalities (those at the top of the Serverfault reputation list come to mind) leave me wishing I had more.

More knowledge, more skills, more time to study, play in a lab, read more books. More motivation to excel and be more creative for my company.

 

I find that it is difficult to really retain knowledge and gain expertise on technology with which you don’t have any real interaction with, and I’m always afraid of spending time learning and mastering something, just to have that knowledge wither and die. When I graduated from SAIT in 2005, I had my CCNA, was trained for CCNP and would have passed the test easily but never took it because my first job was entry level system admin. Since then I haven’t touched a real routing protocol, or any Cisco device for that matter, and those skills have atrophied. I’m fearful that things I spend time on that have no relevance in my current position will be a waste of time.

Perhaps my perspective on all this is a little skewed, since at this medium sized company there are only two IT staff (myself included) and every area of IT falls under my responsibility. I’m directly responsible for (and have implemented myself) Exchange, Hyper-V, SQL, Windows Server and client OS, networking, backups, purchasing, policy making, documentation, monitoring, the list goes on. In addition, I’m beginning to learn C# and ASP.net for developing in-house tools at my company.

Just as Ned mentioned, it’s hard to be an expert in everything, but since I deal with everything, sometimes its hard to be an expert in anything. We’re hiring for a help-desk position in the near future so hopefully that will remove some lower end duties, giving me a bit of free time for some real learning and professional development.

 

All that being said, I start thinking about the things I am involved in at work, and can see many areas of improvement. Exchange and Hyper-V both come to mind, as those have both been my implementations, but I am in no way an expert for either. They’re also both critical to my company, and that in itself is a good motivator for improvement.

 

Either way, knowing there is room for improvement is powerful, and there’s a lot of helpful links from Mr. Pyle that I’ll be following up on.