PASS Powershell Virtual Chapter

by Rich Rousseau 15. October 2010 10:57

I love Powershell and I love SQL Server.  This Virtual Chapter just combined two of my favorite things...like bacon and fudge.

http://powershell.sqlpass.org/

Unable to load client print control - Report Viewer Printing Error

by Rich Rousseau 9. March 2009 22:41

Unable to load client print control

The SQL Server Reporting Services Report Viewer control, found in Report Manager, SharePoint, and custom ASP.Net applications, utilizes a print control that contains a reference to a GDI library with a security vulnerability. Microsoft updated the vulnerable GDI library by deploying a new print control. Microsoft then sent out KB956391, which deployed a killbit that disables the old print control. The problem here is that if you haven't deployed the updated Report Viewer control to all your environments, then all your clients, who automatically received the killbit, are no longer able to print. They receive the "Unable to load client print control" error.

If you're in an enterprise environment where everyone is a limited user, you have secondary problem. Once the Report Viewer control is updated the client needs administrative privileges to install the updated ActiveX client print control. There have been reports of problems installing the updated ActiveX print control. I have experienced both successful and problematic manual installs. If your enterprise has the means to execute remote installations as an administrator, then you can simply take the contents of the RSClientPrint.cab file, copy them to the remote client, then remotely run a regserve32 on the RSClientPrint.dll file. You can find the updated RSClientPrint.cab file in the ReportServer\bin folder of your SP3 or KB954607 updated SSRS installation.

Microsoft recently issued additional guidance on this issue.

Additional Resources

MSDN Forum Post

Brian Hartman's excellent summary of the issue

Mariae's solution summary

SSRS 2008 Tablix Data Region

by Rich Rousseau 6. March 2009 07:31

Robert Bruckner, the developer behind the Tablix data region control in SQL Server Reporting Services 2008, is kicking off a series of posts on the capabilities of the control.  The Tablix control is a combination of the Table and Matrix controls from previous versions of reporting services, and at its most basic allows for dynamic addition of both rows and columns.  It is also the base control for many of the other common controls used in SSRS 2008.  I will be following this series closely.  Read more at Tablix – The Matrix Revolution.

User Experience Patterns Catalog & Examples

by Rich Rousseau 3. March 2009 17:50

Came across a very useful catalog of user experience (UX) design patterns called Quince. It's provided by Infragistics and the catalog itself is a really well done Silverlight application. It allows you to group UX patterns in unique ways that make it easier to find what you're looking for or to discover new patterns you could be using. The Wireframe and User Task views are particularly interesting. When selected, each pattern has a description that explains when it should be used and why. Best of all, each pattern has several real life examples you can scroll through. I think this will be a great repository for when I need some functional UI inspiration.

http://quince.infragistics.com

Using PowerShell to list installed windows updates

by Rich Rousseau 9. January 2009 07:36
Recently I needed to know if a particular windows patch was installed on my machine. I went to Add/Remove Programs and checked the "Show Updates" option, but the list there was too long and my eyes too tired to try and scan them all manually. I thought this should be an easy task for PowerShell, but I didn't know how to access a list of installed updates. I decided WMI would be a good place to start and did quite a few searches using "Get-WmiObject -List". I queried a few different providers that I thought would list them, but I wasn't getting anywhere. I'm sure there is a WMI Provider that lists all windows updates, but couldn't find it.*

Luckily, a coworker of mine who I had been discussing this with helped immensely when he pointed me to a script that would list all installed software. The script uses a registry entry that lists all "uninstallable" software. I knew I could easily search the registry using PowerShell and set about looking for my particular update with the following...

dir HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | where {$_.Name -Like '*kb956391*'}


*I have since found that Win32_QuickFixEngineering will list all windows hotfixes…

Get-WmiObject -Query 'select * from Win32_QuickFixEngineering' | where {$_.HotFixID -eq 'KB956391'}

Reporting Services 2008 Information Aggregator

by Rich Rousseau 6. January 2009 20:53
Robert Bruckner points out the new MSDN aggregation site for Reporting Services 2008. Looks to be the one stop for a wide range of Reporting Services 2008 information with sections for downloads, white papers, video tutorials, links to blogs, podcasts, etc.

There are also sites for Reporting Services 2005 and 2000, though they are not as rich.

Would you like some Microsoft with your Java?

by Rich Rousseau 6. January 2009 17:32

While installing a Java update I came across the typical bundled software option and found Sun was promoting the MSN Toolbar.  I recall previous Java updates offering the Google Toolbar and was a bit surprised to find a Microsoft product being bundled with a Java update.  Aren't Sun and Microsoft competitors?  At least their frameworks are (.Net vs. Java).

 

 

The install option was selected by default.  I took the screenshot after I unchecked it.

Using Windows Server 2008 or Vista SP1 with Virtual PC 2007...

by Rich Rousseau 31. December 2008 23:24
If you want to use Windows Server 2008 or Vista SP1 as a guest operating system with Virtual PC 2007, you'll need Virtual PC 2007 SP1. Updates for both x86 and x64 clients are available. Not sure if you could get either of these working using a different OS selection in VPC. I'm eager to try out the remoting feature in Powershell v2 and currently these operating systems are they only ones that support Powershell remoting.

Nested Subreport Background Color - SSRS 2005

by Rich Rousseau 19. December 2008 07:18

I was recently styling a SQL Server Reporting Services 2005 report that contained a subreport as one of its columns.  This was a tabular report that needed an alternating background color for each row.  The trouble with this is that the subreport cell doesn't expose a BackgroundColor property in the report designer. 

 

No BackgroundColor Property!

 

 

For my first attempt at fixing this, I created a parameter on the subreport called BGColor and setup the subreport's text box BackgroundColor property to get its value from the parameter.  

 


Setting the Subreport BackgroundColor via Parameter.


This worked fine as long as the cell containing the subreport remains its original size.  However my report had columns that sometimes displayed more than one line of text, which caused the row height to expand by a few lines.  This expanded the cell around the subreport, but the subreport did not expand to fill this new area.

 

Bad Report!

 

 

At this point I decided it didn't make sense that the cell containing the subreport didn't have a BackgroundColor property.  A quick search for the RDL schema showed that it's legal to have a BackgroundColor element in the Style element of a subreport element.  Armed with this new information, I opened the RDL file in Notepad2 and added the following…

 

                    <Subreport Name="subreport1">
                      <ReportName>SubReport</ReportName>
                      <Style>
                        <BackgroundColor>=iif(RowNumber(Nothing) Mod 2, "Gray", "White")</BackgroundColor>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                      </Style>
                      <ZIndex>1</ZIndex>
                    </Subreport>

 

 

The BackgroundColor of the subreport will now fill the entire cell even when the cell is expanded. 


Note: The visual studio report designer will not display the background color.  You'll need to deploy the report to an actual Report Server to see the full background color.

 

 

Good Report!


 

MSDN Low Bandwidth View

by Rich Rousseau 30. August 2008 22:00
Jon Galloway posted an article describing a way to view low bandwidth optimized MSDN pages by modifying the URL.

Try it out...

Simply take the URL - http://msdn.microsoft.com/en-us/library/system.object.aspx

And add "(loband)" just before the ".aspx" - http://msdn.microsoft.com/en-us/library/system.object(loband).aspx

The "loband" page provides a link near the top you can use to switch back to full fat version.

Also check Jon's site for a bookmarklet he wrote which you can use to switch this functionality on or off at any time.

This option will be very useful when my laptop's cellular connection has a bad signal (like when on the train). I imagine this will also be helpful to all those smart phone browsers out there. Any smart phone owners care to try it out?

Check out his comments section. The Product Unit Manager for MSDN responded with some insight into what they're doing. It sounds like they might change the way the "loband" option is specified. I was wondering why they didn't just make it a query string item, but I'll bet they've already got some serious url rewriting going on.