Thursday, October 13, 2005

Microsoft Staff Moonlighting as Adventure Works Employees

A bit of trivia (for a change) ... I needed to create a sample data source for a simple smart-client (a.k.a., Windows form) demonstration of the new ReportViewer control that contained more records than Northwind's Employees table. So I executed the following T-SQL query against the AdventureWorks sample database, which returns rows for 295 employees (one employee row is repeated for an additional department):

SELECT Empl.EmployeeID, Cont.LastName,
  Cont.FirstName,
  LEFT(Cont.MiddleName, 1) AS MiddleInitial,
  Dept.GroupName AS [Group],
  Dept.Name AS Department,
  Empl.Title, Cont.Phone,
  Cont.EmailAddress
FROM HumanResources.Employee AS Empl
  INNER JOIN Person.Contact AS Cont
    ON Empl.ContactID = Cont.ContactID
  INNER JOIN HumanResources._
      EmployeeDepartmentHistory AS HREDH
    ON Empl.EmployeeID = HREDH.EmployeeID
  INNER JOIN HumanResources.Department AS Dept
    ON HREDH.DepartmentID = Dept.DepartmentID
ORDER BY Cont.LastName, Cont.FirstName,
  MiddleInitial
Here's the first few rows of a simple report, which uses VBScript expressions to modify and format a simple list report that's grouped by AdventureWorks GroupName categories:

The following simple expressions in the ReportName.rdlc Report Designer file's details row text boxes change the Phone and Email Address field formats:

=IIf(Left(Fields!Phone.Value, 2) = "1 ",
  Fields!Phone.Value,
  "(" & Left(Fields!Phone.Value, 3) &
  ") " & Mid(Fields!Phone.Value, 5))
=Replace(Fields!EmailAddress.Value,
  "@adventure-works", "@a-w")
As I worked on the report layout and experimented with the expressions, I began to recognize some of the names as members of Microsoft's SQL Server group. Here's the end of the Sales and Marketing Group roster:

First to catch my eye was Brian Welcker, Microsoft’s Group Program Manager for SQL Server Reporting Services, moonlighting as Adventure Works' Vice-President of Sales. Syed Abbas is a consultant with Microsoft Consulting Services in New York and A-W's Pacific Sales Manager. Ovidiu Craciun is a member of the SQL Server Management Tools team and, appropriately, A-W's Senior Tool Designer. Stephen (Yuan) Jiang from the SQL Server Storage Engine group is A-W's North American Sales Manager. Tete Mensa-Annan is both an SQL Server Program Manager and A-W Sales Representative. Tsvi Reiter, another A-W Sales Representative, relocated from Redmond to work for Microsoft Business Solutions in Vedbaek, Denmark. Jae Pak, an A-W Sales Representative, is a member of the Performance Monitoring and Analysis Group of the Programmer Productivity Research Center at Microsoft Research. Ramesh Mayyappan is an A-W Information Specialist and the author of Microsoft's "Step-by-Step Guide to Log Shipping for SAP Customers using Microsoft SQL Server 2000." Christian Kleinerman is an A-W Maintenance Supervisor and Program Manager in the SQL Engine team who works on the data access provider (System.Data.SqlServer). Ashvini Sharma is an A-W Network Administrator and Development Lead for SQL Server Integration Services (formerly DTS).

With the exception of Tsvi Reiter and Jae Pak, all the less common names I tested were associated with the SQL Server 2005 team. --rj

Technorati:

P.S. Stay tuned for links to a future Visual Studio Magazine article on programming VS 2005's new ReportViewer control and the downloadable source code for sample VB 2005 project.