Email Formatted HTML Table with T-SQL

  • Dave Vroman

    SSC Eights!

    Points: 821

    [p]Because of PCI compliance, both xp_cmdshell and db_sendmail are disabled on our database servers. I needed to get some of my tasks to send email to me so I used CDOSYS.

    The script supports both text and HTML email formats.[/p]

    [p]Here is the base code:[/p]

    CREATE PROCEDURE usr_sp_send_cdosysmail

    @From_Addr VARCHAR(500) ,

    @To_Addr VARCHAR(500) ,

    @Subject VARCHAR(500) ,

    @Body VARCHAR(8000) ,

    @SMTPserver VARCHAR(25) = 'localhost',

    @BodyType VARCHAR(10) = 'textbody'

    AS

    DECLARE @imsg INT

    DECLARE @hr INT

    DECLARE @source VARCHAR(255)

    DECLARE @description VARCHAR(500)

    EXEC @hr = sp_oacreate 'cdo.message', @imsg out

    EXEC @hr = sp_oasetproperty @imsg, 'configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusing").value','2'

    EXEC @hr = sp_oasetproperty @imsg, 'configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").value', @SMTPserver

    EXEC @hr = sp_oamethod @imsg, 'configuration.fields.UPDATE', NULL

    EXEC @hr = sp_oasetproperty @imsg, 'to', @To_Addr

    EXEC @hr = sp_oasetproperty @imsg, 'from', @From_Addr

    EXEC @hr = sp_oasetproperty @imsg, 'subject', @Subject

    -- If you are using html e-mail, use 'htmlbody' instead of 'textbody'.

    EXEC @hr = sp_oasetproperty @imsg, @BodyType, @Body

    EXEC @hr = sp_oamethod @imsg, 'send', NULL

    EXEC @hr = sp_oadestroy @imsg

    [p]How To Call The Procedure:[/p]

    EXEC usr_sp_send_cdosysmail

    @From_Addr='myaddr@myurl.com',

    @to_Addr ='youraddr@yoururl.com',

    @subject ='Formatted email from SQL',

    @body ='<B>Test Email From SQL</B>

    Please Ignore this <FONT COLOR=red>email.</FONT>',

    @smtpserver ='localhost',

    --

    @bodytype ='HTMLBody'

    -- @bodytype ='textbody'

  • Jeff Moden

    SSC Guru

    Points: 996807

    Mike Dougherty-384281 (6/20/2013)


    Are we solving the problem right?

    Are we solving the right problem?

    Jeff asked why use xp_cmdshell to get to a third-party tool & suggested db_sendmail: depending on your environment, the answer to that first question is either "No" or "Right enough" 🙂

    I wonder if composing html <table>s and emailing them is the right way to share content.

    (aside from the pretty/ugly formatting of inline style workarounds for various capabilities of mail client(s) such as gmail stripping style tags and even inline attributes google decided aren't appropriate for your email or Outlook 2007/2010 using Word to render emails)

    If the data is meant to be further consumed, the html table is somewhat klunky. If the data is meant to be looked at, there is too much requirement for 'pretty' to make emailed tables a robust solution. If the data is meant to be proof that something else happened, does it need to provide so much detail (and cost the overhead to get all that detail, formatted, etc.)?

    If the data were staged for consumption by a data-query in Excel (for example) the analyst using it would be able to easily further transform via charting/pivoting/filtering, etc. If reporting services (either MS, or 3rd party such as Crystal Reports/Crystal Solutions) generates the 'pretty' version to a PDF - that could be mailed/attached/referenced. Another option might be to simply render the data to html via a web service: properly executed CSS can make a nice view for direct human eyes-on or the semantically correct table can be consumed by Excel's html table import (or googledocs html scraping equivalent)

    Another consideration is the amount of content we _can_ get from a query may be much more than we _should_ put in an email. I know, nobody intends to put 30k rows of data in an email... When we built and tested there was only 200 rows in the table... 3 years later we're causing grief to the email administrator when we're storing an html version of the day's snapshot in 12 email recipient's inbox. (and 10 of those recipients keep everything we've ever mailed in "archive" folders on the email server) I'm not sure if this qualifies as Database Backup, but you can see how well it scales. 🙂

    It really does depend. I can't answer for anyone else but I'm a mostly a data-troll and, as a result, don't know how to make a web service and will probably never learn how. I agree that such a thing or the use of Crystal Reports, SSRS, or any of a dozen other methods would probably be the best thing to do for "production runs" but simple embedded HTML created by a stored procedure works quickly and under my full control without much overhead for things like the morning reports that I have to send to people in IT.

    I absolutely agree about the email thing where people keep stuff forever and that HTML formatting is worse than clunky if the data is to be consumed electronically. That's definitely something to consider before building such a repetative email regardless of method used to build it. Even something as simple as large TSV files (for import to Excel, for example) as attachments should be avoided in most cases because of such people. Far better to save it as a "managed" file somewhere that people can get to with their spreadsheets... no email required. Managed files also help with resource usage especially for such events as month end or daily reports using things like Crystal Reports or SSRS. It's far better to have one file somewhere that people can get to than to have hundreds of people all trying to run the same report. It kind of reminds me of the old "green bar" days where people would have a 40 pound bundle of green-bar paper reports delivered to their desk... they'd flip to page "x" and "y" to get a couple of numbers and then throw away the report. It was really silly and wasteful especially considering the number of people that it actually took to build the reports and deliver them.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "If "pre-optimization" is the root of all evil, then what does the resulting no optimization lead to?"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden

    SSC Guru

    Points: 996807

    Dave Vroman (6/20/2013)


    [p]Because of PCI compliance, both xp_cmdshell and db_sendmail are disabled on our database servers. I needed to get some of my tasks to send email to me so I used CDOSYS.

    Since anyone with "SA" privs (attacker or overcurious DBA) can easily get to the command prompt either by turning xp_CmdShell on or through other methods, I'm curious why the PCI would require such a thing. It's been years since I've read/studied the PCI spec. Do you happen to have a link for it?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "If "pre-optimization" is the root of all evil, then what does the resulting no optimization lead to?"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Dave Vroman

    SSC Eights!

    Points: 821

    I didn't do that portion of the requirement. I only got the results. I wrote their encryption package and their encryption interface fully compatible with classic ASP, VB.NET, ASP.NET and VB6 and SQL. I was in charge of the DTS / SSIS packages and needed results from them and ran into several roadblocks. The compliance requirements were especially stringent because the web site got hacked with all of the resulting hassles.

  • bdavey

    Default port

    Points: 1459

    Steve,

    Great article. Thanks for sharing.

  • Gerard van de Ven

    SSC Veteran

    Points: 217

    Yes, email styling is a huge problem, with both Gmail and newer versions of Outlook not supporting any styling other than inline CSS and then even with that only supporting a subset of style elements.

    If you want to know all about that, I have found http://www.campaignmonitor.com/resources/will-it-work/[/url] a very helpful resource.

    Gerard

  • TimothyAWiseman

    SSCrazy Eights

    Points: 8819

    Hello. Thank you for the article. I found it to be a rather interesting to see your approach to this.

    I do have two pieces of constructive feedback:

    -I had to look up what blat was. I normally use sp_dbsendmail when I want to send an e-mail from the server. I can understand circumstances where you might want to use blat, especially on older versions of SQL Server, but it would have been nice to explain what it was in the article.

    -While this was a great approach, unless the recepient specifically asked for HTML I would default to sending them an excel files. It is easy to generate excel files from SQL Server and it provides it in a format that is easy for the user to then perform analysis on or otherwise manipulate.

    Thanks again, it was generally well written and I liked seeing how you handled this.

    ---
    Timothy A Wiseman
    SQL Blog: http://timothyawiseman.wordpress.com/

  • Mike Dougherty-384281

    SSCrazy

    Points: 2764

    Jeff Moden (6/20/2013)


    I absolutely agree about the email thing where people keep stuff forever and that HTML formatting is worse than clunky if the data is to be consumed electronically. That's definitely something to consider before building such a repetative email regardless of method used to build it. Even something as simple as large TSV files (for import to Excel, for example) as attachments should be avoided in most cases because of such people. Far better to save it as a "managed" file somewhere that people can get to with their spreadsheets... no email required. Managed files also help with resource usage especially for such events as month end or daily reports using things like Crystal Reports or SSRS. It's far better to have one file somewhere that people can get to than to have hundreds of people all trying to run the same report. It kind of reminds me of the old "green bar" days where people would have a 40 pound bundle of green-bar paper reports delivered to their desk... they'd flip to page "x" and "y" to get a couple of numbers and then throw away the report. It was really silly and wasteful especially considering the number of people that it actually took to build the reports and deliver them.

    Early in my career I had a job for a few months where I'd gather faxes from the floor & photocopy each to have a flat (non-curled up fax paper) version, then run 40 copies of about 200 pages. After distributing them, the fashion designers (who couldn't be expected to understand the mysteries of a computer/keyboard) would hand-write responses to their 4-5 faxes from suppliers. I'd then spend the afternoon typing those replies and sending them to Hong Kong via Telex. Silly and wasteful, sad too. That was a lot of pallets of cases of paper.

    I guess the modern equivalent is wasted bytes (and time) on backup tape (or to the cloud)

  • Orlando Colamatteo

    SSC Guru

    Points: 182269

    Jeff Moden (6/19/2013)


    Why didn't you just use sp_SendDBMail which can take a 2GB VARCHAR(MAX) body with the custom HTML formatting from your article?

    Amen. You took the words right out of my mouth. As I was reading this article I was saying to myself, "there really is no need to use xp_cmdshell to accomplish this task".

    __________________________________________________________________________________________________
    There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

  • Orlando Colamatteo

    SSC Guru

    Points: 182269

    Jeff Moden (6/20/2013)


    SQL-DBA (6/20/2013)


    Jeff Moden (6/19/2013)


    I don't believe you'll find anyone more pro-xp_CmdShell or pro_BCP than myself but I can't figure out why you bothered with either for this task since sp_SendDBMail could have easily handled this task. And having to install a 3rd party piece of shareware on a server certainly doesn't make for a "T-SQL Only" project, IMHO.

    Why didn't you just use sp_SendDBMail which can take a 2GB VARCHAR(MAX) body with the custom HTML formatting from your article?

    Thanks for the feedback Jeff!

    Basically, I think you are right. I should have written the article with a more modern twist. The practical reason is that I wear many different hats so I end up using Blat for SysAdmin tasks, AD notifications, sending log files, etc. And I was using Blat with SQL Server 7.0. It is just an old habit that works so I haven't changed it.

    Ah! I get that. Thanks, for the feedback, Steve. I still use CDOSYS for my DBA emails for couple of reasons not the least of which is that sp_SendDBMail didn't allow for a specific FROM (fixed in 2012, IIRC) without taking the time to setup a different profile. I also work on servers that don't (and won't for one reason or another) have email setup where it comes in might handy for the generation of "Morning Reports" on the server status.

    sp_send_dbmail supports a From Address and a Reply To address as of SQL 2008.

    __________________________________________________________________________________________________
    There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

  • Orlando Colamatteo

    SSC Guru

    Points: 182269

    nakache (6/20/2013)


    i fixed my code to support the "problematic" gmail which strips any CSS styling...

    and as you say "keep it simple" , so NO bcp, NO xp_cmdshell ,NO Blat = ONLY TSQL 🙂

    Thanks for posting nakache, you beat me to it! As I was reading the article I was thinking of doing the same so folks who wanted this functionality would have the choice on how to accomplish this without being compelled to enable xp_cmdshell on their instance.

    If I have my druthers I do this work within an SSRS report. I like to capture snapshot information I want to present to users in a reporting table for later reference and then email out a link to a report so folks can see the data and export it in any format they prefer. The approach works for me because I offload that rendering overhead to a reporting server and I do not need to do any string manipulation in T-SQL to produce HTML formatting, which for me it is perfectly okay if I never have to do that kind of work in T-SQL again 😀

    __________________________________________________________________________________________________
    There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

  • steve.ledridge

    SSC-Addicted

    Points: 433

    I found the timing of this to be interesting as I just completed a first draft of a CLR Function the returns a SQL table as HTML Table code in order to create better formatted reports.

    Here is the C# code for the CLR Function

    using System;

    using System.Data;

    using System.Data.SqlClient;

    using System.Data.SqlTypes;

    using Microsoft.SqlServer.Server;

    using System.Globalization;

    using System.Text;

    using System.IO;

    using System.Collections;

    using System.Web;

    using System.Xml;

    /// <summary>

    /// <CommentHeader>

    /// <VersionControl>

    /// <DatabaseName>dbaadmin</DatabaseName>

    /// <SchemaName>dbo</SchemaName>

    /// <ObjectType>FUNCTION</ObjectType>

    /// <ObjectName>dbaudf_FormatTableToHTML</ObjectName>

    /// <Version>1.0.1180</Version>

    /// <Build Number="" Application="" Branch="" />

    /// <Created By="Steve Ledridge" On="03/07/2013" />

    /// <Modifications>

    /// <Mod By="" On="" Reason="" />

    /// </Modifications>

    /// </VersionControl>

    /// <Purpose>Creates an HTML Table from a table.</Purpose>

    /// <Description></Description>

    /// <Dependencies>

    /// <Object Type="" Schema="" Name="" VersionCompare="" Version="" />

    /// </Dependencies>

    /// <Parameters>

    /// <Parameter No="1" Type="" Name="Input" Description="" />

    /// <Parameter No="" Type="" Name="" Description="" />

    /// </Parameters>

    /// <Permissions>

    /// <Perm Type="" Priv="" To="" With="" />

    /// </Permissions>

    /// <Examples>

    /// <Example Name="" Text="" />

    /// </Examples>

    /// </CommentHeader>

    /// </summary>

    /// <returns></returns>

    [Microsoft.SqlServer.Server.SqlFunction(

    DataAccess = DataAccessKind.Read,

    SystemDataAccess = SystemDataAccessKind.Read)]

    [return: SqlFacet(MaxSize = -1)]

    public static SqlChars dbaudf_FormatTableToHTML( SqlString TableName

    , SqlBoolean IncludeHeaders

    , SqlString Title

    , [SqlFacet(MaxSize = -1)] SqlChars Summary

    , Int32 HTMLStyle

    , SqlBoolean IncludeDocHeader

    , SqlBoolean IncludeDocFooter

    )

    {

    if (TableName.IsNull) return SqlChars.Null;

    string SummaryText = new string(Summary.Value);

    String Result = "";

    if (IncludeDocHeader.IsTrue)

    {

    Result = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"> \r";

    Result = Result + "<html> \r";

    Result = Result + "<head> \r";

    Result = Result + "<title> " + Title.ToString() + " </title> \r";

    Result = Result + "<meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\r";

    Result = Result + "<meta name=\"Generator\" content=\"dbaudf_FormatTableToHTML\"> \r";

    Result = Result + "<meta name=\"Author\" content=\"dbaudf_FormatTableToHTML\"> \r";

    Result = Result + "<meta name=\"Keywords\" content=\"dbaudf_FormatTableToHTML\"> \r";

    Result = Result + "<meta name=\"Description\" content=\"dbaudf_FormatTableToHTML\"> \r";

    Result = Result + GetHTMStyle(HTMLStyle) + " \r";

    Result = Result + "</head> \r";

    Result = Result + "<body> \r";

    }

    Result = Result + "<table summary=\"" + Title.ToString() + "\"> \r";

    Result = Result + "<caption>" + Title.ToString() + "</caption> \r";

    using (SqlConnection sqlconn = new SqlConnection("Context Connection=True"))

    {

    SqlCommand sqlCmd = sqlconn.CreateCommand();

    sqlCmd.CommandText = string.Format("SELECT * FROM {0}", TableName);

    sqlconn.Open();

    SqlDataReader reader = sqlCmd.ExecuteReader();

    DataTable Table = new DataTable(TableName.ToString());

    Table.Load(reader);

    if (IncludeHeaders.IsTrue)

    {

    Result = Result + "<tr> \r";

    foreach (DataColumn col in Table.Columns)

    {

    Result = Result + "<th class=\"HeaderRow\"> " + col.ColumnName + "</th>\r";

    }

    Result = Result + "</tr> \r";

    }

    int i = 1;

    if (Table.Rows.Count == 0)

    {

    Result = Result + "<tr><td colspan=\"" + Table.Columns.Count + "\">No Data Found.</td></tr> \r";

    }

    foreach(DataRow dr in Table.Rows)

    {

    Result = Result + "<tr> \r";

    foreach (DataColumn col in dr.Table.Columns)

    {

    if(col.DataType.ToString() == "System.Boolean")

    {

    if( Convert.ToBoolean(dr[col]) == false )

    {

    Result = Result + "<td class=\"" + (i % 2 == 0 ? "EvenOverFlowRow":"OddOverFlowRow") + "\"><input type=\"checkbox\" DISABLED name=\"" + col.ColumnName + i + "\"></td>\r";

    }

    else

    {

    Result = Result + "<td class=\"" + (i % 2 == 0 ? "EvenOverFlowRow":"OddOverFlowRow") + "\"><input type=\"checkbox\" DISABLED CHECKED name=\"" + col.ColumnName + i + "\"></td>\r";

    }

    }

    else

    {

    Result = Result + "<td class=\"" + (i % 2 == 0 ? "EvenRow":"OddRow") + "\"> " + dr[col].ToString().Replace("\r", "

    ") + "\r</td>\r";

    }

    }

    Result = Result + "</tr> \r";

    i = i + 1;

    }

    Result = Result + "<tr><td class=\"HeaderRow\" colspan=\"" + Table.Columns.Count + "\">

    " + SummaryText + "</td></tr> \r";

    Result = Result + "</table> \r";

    Result = Result + "

    \r";

    if (IncludeDocFooter.IsTrue)

    {

    Result = Result + "</body> \r";

    Result = Result + "</html> \r";

    }

    Result = Result + " \r";

    }

    return new SqlChars(Result.ToCharArray());

    }

    //35 styles of various CSS definitions to change the color of html reports

    public static String GetHTMStyle(Int32 WhichStyle)

    {

    String cssDefinition = "<style type=\"text/css\"> \r";

    cssDefinition = cssDefinition + " table {border-width:0px;empty-cells:show;width:90%;} \r";

    cssDefinition = cssDefinition + " tr {vertical-align:top;} \r";

    cssDefinition = cssDefinition + " th {vertical-align:top;font-weight:bold;} \r";

    cssDefinition = cssDefinition + " td {vertical-align:top;} \r";

    cssDefinition = cssDefinition + " .SummaryRow {color:#000000;background-color:#C0C0C0;border-left:#808080 0px solid;border-top:#808080 0px solid;border-right:#808080 0px solid;border-bottom:#808080 0px solid;font-family:Tahoma; font-size:7pt; font-weight:normal; font-style:normal; padding-left:0px;} \r";

    switch (WhichStyle)

    {

    case 1:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#EBF5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#EBF5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#FAF2DF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#FAF2DF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 2:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#EAF5F5;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#EAF5F5;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#FFF5D2;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#FFF5D2;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 3:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#EFF7FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#EFF7FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F9F5F9;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F9F5F9;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 4:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#EFF7FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#EFF7FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F8F8F8;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F8F8F8;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 5:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#E6F5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#E6F5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#EFFAE1;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#EFFAE1;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 6:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F5F5FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F5F5FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#FFF7EC;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#FFF7EC;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 7:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F4F9FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F4F9FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#FCF6FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#FCF6FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 8:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#E8E2D1;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#E8E2D1;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F8F4E9;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F8F4E9;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 9:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 10:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 11:

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#9DDDFC;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#9DDDFC;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#DDF4FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#DDF4FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 12:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#E8F3FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#E8F3FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 13:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 14:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#FFF2F2;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#FFF2F2;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 15:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#EDF3FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#EDF3FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 16:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 17:

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#64646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#69646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#FFFFFF;background-color:#64646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddRow {color:#FFFFFF;background-color:#69646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 18:

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#64646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#69646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#FFFFFF;background-color:#64646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddRow {color:#FFFFFF;background-color:#69646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 19:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 20:

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#414146;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#464146;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#B4B4B4;background-color:#414146;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddRow {color:#B4B4B4;background-color:#464146;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 21:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#EBF2FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#FAF5FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#2A2C36;background-color:#EBF2FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddRow {color:#2A2C36;background-color:#FAF5FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 22:

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#404040;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#4A4A4A;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#FFFFFF;background-color:#404040;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddRow {color:#FFFFFF;background-color:#4A4A4A;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 23:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F7F6FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F7F6FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 24:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F7F6FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F7F6FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 25:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#EBF5FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#FFF2FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#2A2C36;background-color:#EBF5FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddRow {color:#2A2C36;background-color:#FFF2FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 26:

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#454758;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#494557;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddRow {color:#E6E8F2;background-color:#454758;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#E6E8F2;background-color:#494557;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 27:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F7F4FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#201F35;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddRow {color:#201F35;background-color:#F7F4FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 28:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F5FBFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F5FBFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 29:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 30:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 31:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 32:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#F0F6FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#F0F6FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F9F4F6;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F9F4F6;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 33:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 34:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#3C3C3C;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddRow {color:#3C3C3C;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    case 35:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .EvenOverFlowRow {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .EvenRow {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    default:

    cssDefinition = cssDefinition + " .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} \r";

    cssDefinition = cssDefinition + " .OddOverFlowRow {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } \r";

    cssDefinition = cssDefinition + " .OddRow {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} \r";

    cssDefinition = cssDefinition + " .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} \r";

    cssDefinition = cssDefinition + " </style> \r";

    break;

    }

    return cssDefinition;

    }

    public static String GetHTMStyle(string WhichStyle)

    {

    switch (WhichStyle)

    {

    case "Caramel":

    return GetHTMStyle(1);

    case "Money Twins":

    return GetHTMStyle(2);

    case "Lilian":

    return GetHTMStyle(3);

    case "The Asphalt World":

    return GetHTMStyle(4);

    case "iMaginary":

    return GetHTMStyle(5);

    case "Black":

    return GetHTMStyle(6);

    case "Blue":

    return GetHTMStyle(7);

    case "Coffee":

    return GetHTMStyle(8);

    case "Liquid Sky":

    return GetHTMStyle(9);

    case "London Liquid Sky":

    return GetHTMStyle(10);

    case "Glass Oceans":

    return GetHTMStyle(11);

    case "Stardust":

    return GetHTMStyle(12);

    case "Xmas 2008 Blue":

    return GetHTMStyle(13);

    case "Valentine":

    return GetHTMStyle(14);

    case "McSkin":

    return GetHTMStyle(15);

    case "Summer 2008":

    return GetHTMStyle(16);

    case "Pumpkin":

    return GetHTMStyle(17);

    case "Dark Side":

    return GetHTMStyle(18);

    case "Springtime":

    return GetHTMStyle(19);

    case "Darkroom":

    return GetHTMStyle(20);

    case "Foggy":

    return GetHTMStyle(21);

    case "High Contrast":

    return GetHTMStyle(22);

    case "Seven":

    return GetHTMStyle(23);

    case "Seven Classic":

    return GetHTMStyle(24);

    case "Sharp":

    return GetHTMStyle(25);

    case "Sharp Plus":

    return GetHTMStyle(26);

    case "DevExpress Style":

    return GetHTMStyle(27);

    case "Office 2007 Blue":

    return GetHTMStyle(28);

    case "Office 2007 Black":

    return GetHTMStyle(29);

    case "Office 2007 Silver":

    return GetHTMStyle(30);

    case "Office 2007 Green":

    return GetHTMStyle(31);

    case "Office 2007 Pink":

    return GetHTMStyle(32);

    case "Office 2010 Blue":

    return GetHTMStyle(33);

    case "Office 2010 Black":

    return GetHTMStyle(34);

    case "Office 2010 Silver":

    return GetHTMStyle(35);

    default:

    return GetHTMStyle(10);

    }

    }

    };

    and here is an example of how I used it.

    I put my final output to a temp table use one CLR Function to generate the HTML and then another CLR Function to write the HTML to a file.

    ---------------------------------------------------------------------------

    ---------------------------------------------------------------------------

    -- MISSING INDEX INFO

    ---------------------------------------------------------------------------

    ---------------------------------------------------------------------------

    IF OBJECT_ID('tempdb..#TempData') IS NOT NULL DROP TABLE #TempData

    GO

    ---------------------------------------------------------------------------

    SELECT CONVERT(decimal(18,2),user_seeks * avg_total_user_cost * (avg_user_impact * 0.01)) AS [index advantage]

    ,DB_NAME(mid.database_id) AS [Database Name]

    ,OBJECT_NAME(mid.object_id,mid.database_id) AS [Table Name]

    , mid.[statement] AS [Database Schema Table]

    ,migs.last_user_seek [last user seek]

    ,mid.equality_columns [equality columns]

    ,mid.inequality_columns [inequality columns]

    ,mid.included_columns [included columns]

    ,migs.unique_compiles [unique compiles]

    ,migs.user_seeks

    ,migs.avg_total_user_cost [avg total user cost]

    ,migs.avg_user_impact [avg user impact]

    INTO #TempData

    FROM sys.dm_db_missing_index_group_stats AS migs WITH (NOLOCK)

    JOIN sys.dm_db_missing_index_groups AS mig WITH (NOLOCK)

    ON migs.group_handle = mig.index_group_handle

    JOIN sys.dm_db_missing_index_details AS mid WITH (NOLOCK)

    ON mig.index_handle = mid.index_handle

    ORDER BY 1 DESC OPTION (RECOMPILE);

    ---------------------------------------------------------------------------

    SELECT [dbaadmin].[dbo].[dbaudf_FileAccess_Write]([dbaadmin].[dbo].[dbaudf_FormatTableToHTML] ('#TempData',1

    ,'Missing Indexes'

    ,'Missing Indexes for all databases by Index Advantage: Getting missing index information for all of the databases on the instance is very useful. Look at last user seek time, number of user seeks to help determine source and importance. SQL Server is overly eager to add included columns, so beware and do not just blindly add indexes that show up from this query!!!.'

    ,16,1,1),'C:\temp\table.html',0,1)

    ---------------------------------------------------------------------------

    ---------------------------------------------------------------------------

    Returns a table like this....

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <html>

    <head>

    <title> Missing Indexes </title>

    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">

    <meta name="Generator" content="dbaudf_FormatTableToHTML">

    <meta name="Author" content="dbaudf_FormatTableToHTML">

    <meta name="Keywords" content="dbaudf_FormatTableToHTML">

    <meta name="Description" content="dbaudf_FormatTableToHTML">

    <style type="text/css">

    table {border-width:0px;empty-cells:show;width:90%;}

    tr {vertical-align:top;}

    th {vertical-align:top;font-weight:bold;}

    td {vertical-align:top;}

    .SummaryRow {color:#000000;background-color:#C0C0C0;border-left:#808080 0px solid;border-top:#808080 0px solid;border-right:#808080 0px solid;border-bottom:#808080 0px solid;font-family:Tahoma; font-size:7pt; font-weight:normal; font-style:normal; padding-left:0px;}

    .HeaderRow {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;}

    .EvenOverFlowRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; }

    .EvenRow {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;}

    .OddOverFlowRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; }

    .OddRow {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;}

    .csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;}

    </style>

    </head>

    <body>

    <table summary="Missing Indexes">

    <caption>Missing Indexes</caption>

    <tr>

    <th class="HeaderRow"> index advantage</th>

    <th class="HeaderRow"> Database Name</th>

    <th class="HeaderRow"> Table Name</th>

    <th class="HeaderRow"> Database Schema Table</th>

    <th class="HeaderRow"> last user seek</th>

    <th class="HeaderRow"> equality columns</th>

    <th class="HeaderRow"> inequality columns</th>

    <th class="HeaderRow"> included columns</th>

    <th class="HeaderRow"> unique compiles</th>

    <th class="HeaderRow"> user seeks</th>

    <th class="HeaderRow"> avg total user cost</th>

    <th class="HeaderRow"> avg user impact</th>

    </tr>

    <tr>

    <td class="OddRow"> 133208.23

    </td>

    <td class="OddRow"> dbaperf

    </td>

    <td class="OddRow"> tempdb_sessionstats_log

    </td>

    <td class="OddRow"> [dbaperf].[dbo].[tempdb_sessionstats_log]

    </td>

    <td class="OddRow"> 6/20/2013 3:45:01 PM

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> [rundate]

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> 13

    </td>

    <td class="OddRow"> 22902

    </td>

    <td class="OddRow"> 6.30508997000707

    </td>

    <td class="OddRow"> 92.25

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 97382.07

    </td>

    <td class="EvenRow"> dbaperf

    </td>

    <td class="EvenRow"> DMV_QueryDaily_current

    </td>

    <td class="EvenRow"> [dbaperf].[dbo].[DMV_QueryDaily_current]

    </td>

    <td class="EvenRow"> 6/20/2013 12:01:30 AM

    </td>

    <td class="EvenRow"> [qs_id]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> 354

    </td>

    <td class="EvenRow"> 1179606

    </td>

    <td class="EvenRow"> 0.086562587192907

    </td>

    <td class="EvenRow"> 95.37

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 39200.23

    </td>

    <td class="OddRow"> dbaperf

    </td>

    <td class="OddRow"> DMV_QueryDaily_current

    </td>

    <td class="OddRow"> [dbaperf].[dbo].[DMV_QueryDaily_current]

    </td>

    <td class="OddRow"> 6/20/2013 12:01:30 AM

    </td>

    <td class="OddRow"> [sql_handle], [plan_handle], [plan_generation_num], [statement_start_offset], [dbid], [objectid]

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> 126

    </td>

    <td class="OddRow"> 442251

    </td>

    <td class="OddRow"> 0.102011694927425

    </td>

    <td class="OddRow"> 86.89

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 25459.20

    </td>

    <td class="EvenRow"> dbaperf

    </td>

    <td class="EvenRow"> DMV_QueryStats_current

    </td>

    <td class="EvenRow"> [dbaperf].[dbo].[DMV_QueryStats_current]

    </td>

    <td class="EvenRow"> 6/20/2013 5:10:09 AM

    </td>

    <td class="EvenRow"> [qs_id]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> 2072

    </td>

    <td class="EvenRow"> 750561

    </td>

    <td class="EvenRow"> 0.0378489479665097

    </td>

    <td class="EvenRow"> 89.62

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 11058.58

    </td>

    <td class="OddRow"> dbaperf

    </td>

    <td class="OddRow"> DMV_QueryStats_current

    </td>

    <td class="OddRow"> [dbaperf].[dbo].[DMV_QueryStats_current]

    </td>

    <td class="OddRow"> 6/20/2013 5:10:06 AM

    </td>

    <td class="OddRow"> [sql_handle], [plan_handle], [plan_generation_num], [statement_start_offset], [dbid], [objectid]

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> 805

    </td>

    <td class="OddRow"> 303296

    </td>

    <td class="OddRow"> 0.0453273974936869

    </td>

    <td class="OddRow"> 80.44

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 7067.08

    </td>

    <td class="EvenRow"> dbaperf

    </td>

    <td class="EvenRow"> DMV_Indexusage_current

    </td>

    <td class="EvenRow"> [dbaperf].[dbo].[DMV_Indexusage_current]

    </td>

    <td class="EvenRow"> 4/11/2013 8:00:02 PM

    </td>

    <td class="EvenRow"> [database_id], [object_id], [index_id]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> 11

    </td>

    <td class="EvenRow"> 270804

    </td>

    <td class="EvenRow"> 0.0299858288648437

    </td>

    <td class="EvenRow"> 87.03

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 5494.24

    </td>

    <td class="OddRow"> dbaperf

    </td>

    <td class="OddRow"> DMV_QueryStats_current

    </td>

    <td class="OddRow"> [dbaperf].[dbo].[DMV_QueryStats_current]

    </td>

    <td class="OddRow"> 6/20/2013 5:10:09 AM

    </td>

    <td class="OddRow"> [sql_handle], [plan_handle], [plan_generation_num], [statement_start_offset]

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> 772

    </td>

    <td class="OddRow"> 145394

    </td>

    <td class="OddRow"> 0.0471532619390708

    </td>

    <td class="OddRow"> 80.14

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 4617.14

    </td>

    <td class="EvenRow"> dbaadmin

    </td>

    <td class="EvenRow"> pong_return

    </td>

    <td class="EvenRow"> [dbaadmin].[dbo].[pong_return]

    </td>

    <td class="EvenRow"> 6/16/2013 7:45:57 AM

    </td>

    <td class="EvenRow"> [pong_stamp]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> 142

    </td>

    <td class="EvenRow"> 946

    </td>

    <td class="EvenRow"> 4.91312821989647

    </td>

    <td class="EvenRow"> 99.34

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 821.24

    </td>

    <td class="OddRow"> dbaperf

    </td>

    <td class="OddRow"> unused_objects

    </td>

    <td class="OddRow"> [dbaperf].[dbo].[unused_objects]

    </td>

    <td class="OddRow"> 6/20/2013 3:40:04 PM

    </td>

    <td class="OddRow"> [DBname]

    </td>

    <td class="OddRow"> [Use_date]

    </td>

    <td class="OddRow"> [Schema_name], [Object_name]

    </td>

    <td class="OddRow"> 4

    </td>

    <td class="OddRow"> 26621

    </td>

    <td class="OddRow"> 0.0455741891202478

    </td>

    <td class="OddRow"> 67.69

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 664.11

    </td>

    <td class="EvenRow"> tempdb

    </td>

    <td class="EvenRow"> RG_AllObjects

    </td>

    <td class="EvenRow"> [tempdb].[dbo].[RG_AllObjects]

    </td>

    <td class="EvenRow"> 4/18/2013 8:18:19 PM

    </td>

    <td class="EvenRow"> [Matched]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [DatabaseID], [ObjectType], [ObjectID], [ParentObjectID]

    </td>

    <td class="EvenRow"> 2

    </td>

    <td class="EvenRow"> 21740

    </td>

    <td class="EvenRow"> 0.182266980417182

    </td>

    <td class="EvenRow"> 16.76

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 630.53

    </td>

    <td class="OddRow"> tempdb

    </td>

    <td class="OddRow"> RG_AllObjects

    </td>

    <td class="OddRow"> [tempdb].[dbo].[RG_AllObjects]

    </td>

    <td class="OddRow"> 4/18/2013 8:18:19 PM

    </td>

    <td class="OddRow"> [Matched]

    </td>

    <td class="OddRow"> [TypeOfAction]

    </td>

    <td class="OddRow"> [DatabaseID], [ObjectType], [ObjectID]

    </td>

    <td class="OddRow"> 2

    </td>

    <td class="OddRow"> 21740

    </td>

    <td class="OddRow"> 0.135719570379543

    </td>

    <td class="OddRow"> 21.37

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 594.39

    </td>

    <td class="EvenRow"> dbaperf

    </td>

    <td class="EvenRow"> unused_objects_work

    </td>

    <td class="EvenRow"> [dbaperf].[dbo].[unused_objects_work]

    </td>

    <td class="EvenRow"> 6/20/2013 3:40:05 PM

    </td>

    <td class="EvenRow"> [used_flag]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [DBname], [Schema_name], [Object_name]

    </td>

    <td class="EvenRow"> 8010

    </td>

    <td class="EvenRow"> 26421

    </td>

    <td class="EvenRow"> 0.0519197766344101

    </td>

    <td class="EvenRow"> 43.33

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 343.91

    </td>

    <td class="OddRow"> tempdb

    </td>

    <td class="OddRow"> RG_AllObjects

    </td>

    <td class="OddRow"> [tempdb].[dbo].[RG_AllObjects]

    </td>

    <td class="OddRow"> 4/18/2013 8:18:19 PM

    </td>

    <td class="OddRow"> [ObjectType]

    </td>

    <td class="OddRow"> [TypeOfAction]

    </td>

    <td class="OddRow"> [DatabaseID], [ObjectID], [ParentObjectID], [ParentObjectType]

    </td>

    <td class="OddRow"> 1

    </td>

    <td class="OddRow"> 10869

    </td>

    <td class="OddRow"> 0.150888980563703

    </td>

    <td class="OddRow"> 20.97

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 338.17

    </td>

    <td class="EvenRow"> tempdb

    </td>

    <td class="EvenRow"> RG_AllObjects

    </td>

    <td class="EvenRow"> [tempdb].[dbo].[RG_AllObjects]

    </td>

    <td class="EvenRow"> 4/18/2013 8:18:19 PM

    </td>

    <td class="EvenRow"> [ObjectType]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [DatabaseID], [ObjectID]

    </td>

    <td class="EvenRow"> 1

    </td>

    <td class="EvenRow"> 10869

    </td>

    <td class="EvenRow"> 0.150888980563703

    </td>

    <td class="EvenRow"> 20.62

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 312.79

    </td>

    <td class="OddRow"> tempdb

    </td>

    <td class="OddRow"> RG_AllObjects

    </td>

    <td class="OddRow"> [tempdb].[dbo].[RG_AllObjects]

    </td>

    <td class="OddRow"> 4/18/2013 8:18:19 PM

    </td>

    <td class="OddRow"> [Matched]

    </td>

    <td class="OddRow"> [MatchCount]

    </td>

    <td class="OddRow"> [DatabaseID], [ObjectType], [ObjectID], [ParentObjectID]

    </td>

    <td class="OddRow"> 2

    </td>

    <td class="OddRow"> 10870

    </td>

    <td class="OddRow"> 0.077394055203023

    </td>

    <td class="OddRow"> 37.18

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 312.18

    </td>

    <td class="EvenRow"> tempdb

    </td>

    <td class="EvenRow"> RG_AllObjects

    </td>

    <td class="EvenRow"> [tempdb].[dbo].[RG_AllObjects]

    </td>

    <td class="EvenRow"> 4/18/2013 8:18:19 PM

    </td>

    <td class="EvenRow"> [TypeOfAction], [Matched]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [DatabaseID], [ObjectType], [ObjectID]

    </td>

    <td class="EvenRow"> 1

    </td>

    <td class="EvenRow"> 10870

    </td>

    <td class="EvenRow"> 0.0962131787121108

    </td>

    <td class="EvenRow"> 29.85

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 311.73

    </td>

    <td class="OddRow"> tempdb

    </td>

    <td class="OddRow"> RG_AllObjects

    </td>

    <td class="OddRow"> [tempdb].[dbo].[RG_AllObjects]

    </td>

    <td class="OddRow"> 4/18/2013 8:18:19 PM

    </td>

    <td class="OddRow"> [TypeOfAction]

    </td>

    <td class="OddRow"> [ParentObjectID]

    </td>

    <td class="OddRow"> [DatabaseID], [ObjectType], [ModifyDate]

    </td>

    <td class="OddRow"> 1

    </td>

    <td class="OddRow"> 10870

    </td>

    <td class="OddRow"> 0.106608802773533

    </td>

    <td class="OddRow"> 26.9

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 311.73

    </td>

    <td class="EvenRow"> tempdb

    </td>

    <td class="EvenRow"> RG_AllObjects

    </td>

    <td class="EvenRow"> [tempdb].[dbo].[RG_AllObjects]

    </td>

    <td class="EvenRow"> 4/18/2013 8:18:19 PM

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [TypeOfAction]

    </td>

    <td class="EvenRow"> [AllObjectsID], [DatabaseID], [ObjectType], [ObjectID], [ModifyDate]

    </td>

    <td class="EvenRow"> 1

    </td>

    <td class="EvenRow"> 10870

    </td>

    <td class="EvenRow"> 0.106608802773533

    </td>

    <td class="EvenRow"> 26.9

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 271.88

    </td>

    <td class="OddRow"> msdb

    </td>

    <td class="OddRow"> sysjobhistory

    </td>

    <td class="OddRow"> [msdb].[dbo].[sysjobhistory]

    </td>

    <td class="OddRow"> 6/20/2013 5:03:03 AM

    </td>

    <td class="OddRow"> [step_id]

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> [job_id], [run_status], [run_date], [run_time]

    </td>

    <td class="OddRow"> 495

    </td>

    <td class="OddRow"> 459

    </td>

    <td class="OddRow"> 4.62034632819771

    </td>

    <td class="OddRow"> 12.82

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 123.46

    </td>

    <td class="EvenRow"> dbaadmin

    </td>

    <td class="EvenRow"> IndexMaintenanceProcess

    </td>

    <td class="EvenRow"> [dbaadmin].[dbo].[IndexMaintenanceProcess]

    </td>

    <td class="EvenRow"> 6/20/2013 5:03:06 AM

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [Status]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> 103

    </td>

    <td class="EvenRow"> 593

    </td>

    <td class="EvenRow"> 0.212073331563138

    </td>

    <td class="EvenRow"> 98.17

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 98.43

    </td>

    <td class="OddRow"> dbaperf

    </td>

    <td class="OddRow"> DMV_QueryStats_log

    </td>

    <td class="OddRow"> [dbaperf].[dbo].[DMV_QueryStats_log]

    </td>

    <td class="OddRow"> 5/27/2013 3:20:03 PM

    </td>

    <td class="OddRow"> [dbid], [objectid]

    </td>

    <td class="OddRow"> [rundate]

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> 304

    </td>

    <td class="OddRow"> 304

    </td>

    <td class="OddRow"> 0.551193197199576

    </td>

    <td class="OddRow"> 58.74

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 90.70

    </td>

    <td class="EvenRow"> msdb

    </td>

    <td class="EvenRow"> sysjobhistory

    </td>

    <td class="EvenRow"> [msdb].[dbo].[sysjobhistory]

    </td>

    <td class="EvenRow"> 6/20/2013 5:03:03 AM

    </td>

    <td class="EvenRow"> [step_id]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [job_id], [run_date], [run_time], [run_duration]

    </td>

    <td class="EvenRow"> 165

    </td>

    <td class="EvenRow"> 153

    </td>

    <td class="EvenRow"> 4.62034632819771

    </td>

    <td class="EvenRow"> 12.83

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 90.63

    </td>

    <td class="OddRow"> msdb

    </td>

    <td class="OddRow"> sysjobhistory

    </td>

    <td class="OddRow"> [msdb].[dbo].[sysjobhistory]

    </td>

    <td class="OddRow"> 6/20/2013 5:03:03 AM

    </td>

    <td class="OddRow"> [step_id]

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> [job_id], [run_status], [run_date], [run_time], [run_duration]

    </td>

    <td class="OddRow"> 165

    </td>

    <td class="OddRow"> 153

    </td>

    <td class="OddRow"> 4.62034632819771

    </td>

    <td class="OddRow"> 12.82

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 90.56

    </td>

    <td class="EvenRow"> msdb

    </td>

    <td class="EvenRow"> sysjobhistory

    </td>

    <td class="EvenRow"> [msdb].[dbo].[sysjobhistory]

    </td>

    <td class="EvenRow"> 6/20/2013 5:03:03 AM

    </td>

    <td class="EvenRow"> [step_id]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [job_id], [run_date], [run_time]

    </td>

    <td class="EvenRow"> 165

    </td>

    <td class="EvenRow"> 153

    </td>

    <td class="EvenRow"> 4.62034632819771

    </td>

    <td class="EvenRow"> 12.81

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 43.18

    </td>

    <td class="OddRow"> dbaadmin

    </td>

    <td class="OddRow"> IndexMaintenanceProcess

    </td>

    <td class="OddRow"> [dbaadmin].[dbo].[IndexMaintenanceProcess]

    </td>

    <td class="OddRow"> 6/18/2013 6:00:08 PM

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> [Status]

    </td>

    <td class="OddRow"> [IMP_ID]

    </td>

    <td class="OddRow"> 16

    </td>

    <td class="OddRow"> 207

    </td>

    <td class="OddRow"> 0.212911150607591

    </td>

    <td class="OddRow"> 97.98

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 17.09

    </td>

    <td class="EvenRow"> dbaadmin

    </td>

    <td class="EvenRow"> IndexMaintenanceProcess

    </td>

    <td class="EvenRow"> [dbaadmin].[dbo].[IndexMaintenanceProcess]

    </td>

    <td class="EvenRow"> 6/19/2013 6:00:02 PM

    </td>

    <td class="EvenRow"> [Status]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> 16

    </td>

    <td class="EvenRow"> 80

    </td>

    <td class="EvenRow"> 0.217975880296296

    </td>

    <td class="EvenRow"> 98.02

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 15.64

    </td>

    <td class="OddRow"> msdb

    </td>

    <td class="OddRow"> backupfile

    </td>

    <td class="OddRow"> [msdb].[dbo].[backupfile]

    </td>

    <td class="OddRow"> 6/20/2013 3:05:00 PM

    </td>

    <td class="OddRow"> [is_present]

    </td>

    <td class="OddRow"> [filegroup_name]

    </td>

    <td class="OddRow"> [backup_set_id]

    </td>

    <td class="OddRow"> 20

    </td>

    <td class="OddRow"> 540

    </td>

    <td class="OddRow"> 0.294554221888402

    </td>

    <td class="OddRow"> 9.83

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 9.44

    </td>

    <td class="EvenRow"> msdb

    </td>

    <td class="EvenRow"> sysjobhistory

    </td>

    <td class="EvenRow"> [msdb].[dbo].[sysjobhistory]

    </td>

    <td class="EvenRow"> 5/10/2013 8:54:14 PM

    </td>

    <td class="EvenRow"> [job_id]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [step_id]

    </td>

    <td class="EvenRow"> 16

    </td>

    <td class="EvenRow"> 17

    </td>

    <td class="EvenRow"> 0.562497159643619

    </td>

    <td class="EvenRow"> 98.68

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 2.22

    </td>

    <td class="OddRow"> dbaperf

    </td>

    <td class="OddRow"> dmv_IndexBaseLine

    </td>

    <td class="OddRow"> [dbaperf].[dbo].[dmv_IndexBaseLine]

    </td>

    <td class="OddRow"> 6/20/2013 1:15:30 AM

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> [type_desc], [row_count]

    </td>

    <td class="OddRow"> [database_id], [object_id]

    </td>

    <td class="OddRow"> 64

    </td>

    <td class="OddRow"> 64

    </td>

    <td class="OddRow"> 0.208795517554372

    </td>

    <td class="OddRow"> 16.63

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 1.60

    </td>

    <td class="EvenRow"> dbaperf

    </td>

    <td class="EvenRow"> dmv_IndexBaseLine

    </td>

    <td class="EvenRow"> [dbaperf].[dbo].[dmv_IndexBaseLine]

    </td>

    <td class="EvenRow"> 6/20/2013 1:15:30 AM

    </td>

    <td class="EvenRow"> [type_desc]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [row_id], [database_id], [object_id], [indexed_columns]

    </td>

    <td class="EvenRow"> 64

    </td>

    <td class="EvenRow"> 64

    </td>

    <td class="EvenRow"> 0.208795517554372

    </td>

    <td class="EvenRow"> 11.97

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 1.19

    </td>

    <td class="OddRow"> dbaperf

    </td>

    <td class="OddRow"> unused_objects_work

    </td>

    <td class="OddRow"> [dbaperf].[dbo].[unused_objects_work]

    </td>

    <td class="OddRow"> 5/26/2013 9:30:03 PM

    </td>

    <td class="OddRow"> [used_flag]

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> 48

    </td>

    <td class="OddRow"> 51

    </td>

    <td class="OddRow"> 0.0522295243251806

    </td>

    <td class="OddRow"> 44.82

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 0.22

    </td>

    <td class="EvenRow"> msdb

    </td>

    <td class="EvenRow"> sysjobsteps

    </td>

    <td class="EvenRow"> [msdb].[dbo].[sysjobsteps]

    </td>

    <td class="EvenRow"> 5/10/2013 8:50:43 PM

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> [output_file_name]

    </td>

    <td class="EvenRow"> [job_id], [step_id]

    </td>

    <td class="EvenRow"> 6

    </td>

    <td class="EvenRow"> 6

    </td>

    <td class="EvenRow"> 0.0525138043209877

    </td>

    <td class="EvenRow"> 70.26

    </td>

    </tr>

    <tr>

    <td class="OddRow"> 0.04

    </td>

    <td class="OddRow"> dbaperf

    </td>

    <td class="OddRow"> dmv_IndexBaseLine

    </td>

    <td class="OddRow"> [dbaperf].[dbo].[dmv_IndexBaseLine]

    </td>

    <td class="OddRow"> 5/26/2013 1:16:21 AM

    </td>

    <td class="OddRow"> [database_id], [object_id]

    </td>

    <td class="OddRow"> [type_desc], [row_count]

    </td>

    <td class="OddRow">

    </td>

    <td class="OddRow"> 1

    </td>

    <td class="OddRow"> 1

    </td>

    <td class="OddRow"> 0.289962456244064

    </td>

    <td class="OddRow"> 15.16

    </td>

    </tr>

    <tr>

    <td class="EvenRow"> 0.03

    </td>

    <td class="EvenRow"> msdb

    </td>

    <td class="EvenRow"> sysjobsteps

    </td>

    <td class="EvenRow"> [msdb].[dbo].[sysjobsteps]

    </td>

    <td class="EvenRow"> 4/30/2013 8:50:09 PM

    </td>

    <td class="EvenRow"> [step_name]

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow">

    </td>

    <td class="EvenRow"> 4

    </td>

    <td class="EvenRow"> 5

    </td>

    <td class="EvenRow"> 0.0212318162242242

    </td>

    <td class="EvenRow"> 28.26

    </td>

    </tr>

    <tr><td class="HeaderRow" colspan="12">

    Missing Indexes for all databases by Index Advantage: Getting missing index information for all of the databases on the instance is very useful. Look at last user seek time, number of user seeks to help determine source and importance. SQL Server is overly eager to add included columns, so beware and do not just blindly add indexes that show up from this query!!!.</td></tr>

    </table>

    </body>

    </html>

  • steve.ledridge

    SSC-Addicted

    Points: 433

    As a side note, I also came up with some T-SQL that will generate HTML Charts using Google Charts.

    DECLARE @HTMLOutput VarChar(max)

    ,@TitleString VarChar(max)

    ,@InputValidation Bit

    ,@InputValidationMsg VarChar(max)

    ,@SeriesString VarChar(max)

    ,@ColumnString VarChar(max)

    SELECT @HTMLOutput = ''

    ,@TitleString = 'CPU History'

    ,@InputValidation = 0

    ,@InputValidationMsg = ''

    ,@SeriesString = '1:{type: "area"}, 2:{type: "area"}'

    ,@ColumnString = '0,1,2,3'

    SELECT @HTMLOutput = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

    <title>

    Getty Images Opperations Report

    </title>

    <script type="text/javascript" src="http://www.google.com/jsapi"></script>

    <script type="text/javascript">

    google.load(''visualization'', ''1'', {packages: [''table'',''corechart'']});

    </script>

    <script type="text/javascript">

    function drawVisualization() {

    // Create and populate the data table.

    var data = new google.visualization.DataTable();

    data.addColumn(''datetime'', ''Event'');

    data.addColumn(''number'', ''SQL'');

    data.addColumn(''number'', ''IDLE'');

    data.addColumn(''number'', ''OTHER'');

    data.addRows(['+CHAR(13)+CHAR(10)

    -- Get CPU Utilization History for last 256 minutes (in one minute intervals) (Query 27) (CPU Utilization History)

    -- This version works with SQL Server 2008 and SQL Server 2008 R2 only

    DECLARE @ts_now bigint = (SELECT cpu_ticks/(cpu_ticks/ms_ticks)FROM sys.dm_os_sys_info);

    SELECT TOP(256)

    @HTMLOutput = @HTMLOutput

    + ' [ new Date(' + REPLACE(REPLACE(REPLACE(CONVERT(VarChar(50),DATEADD(ms, -1 * (@ts_now - [timestamp]), GETDATE()),120),'-',','),' ',','),':',',')

    + '),' + CAST(COALESCE([SQLProcessUtilization],'') AS VarChar(50))

    + ',' + CAST(COALESCE([SystemIdle],'') AS VarChar(50))

    + ',' + CAST(COALESCE(100 - [SystemIdle] - [SQLProcessUtilization],'') AS VarChar(50))

    + '],' +CHAR(13)+CHAR(10)

    FROM (

    SELECT record.value('(./Record/@id)[1]', 'int') AS record_id,

    record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]', 'int')

    AS [SystemIdle],

    record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]',

    'int')

    AS [SQLProcessUtilization], [timestamp]

    FROM (

    SELECT [timestamp], CONVERT(xml, record) AS [record]

    FROM sys.dm_os_ring_buffers WITH (NOLOCK)

    WHERE ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR'

    AND record LIKE N'%<SystemHealth>%') AS x

    ) AS y

    ORDER BY record_id DESC OPTION (RECOMPILE);

    SELECT @HTMLOutput = @HTMLOutput +' ]);

    var chart1 = new google.visualization.AreaChart(document.getElementById(''chart1''));

    var options1 = {isStacked: true,

    height: 400,

    legend: "bottom",

    title: '''+@TitleString+''',

    vAxis: {title: "% CPU"},

    hAxis: {title: "Date"}

    };

    var table = new google.visualization.Table(document.getElementById(''table''));

    var dataView = new google.visualization.DataView(data);

    // Create and draw the visualization.

    dataView.setColumns(['+@ColumnString+']);

    chart1.draw(data, options1);

    table.draw(data, null);

    }

    function ShowHide(divId)

    {

    if(document.getElementById(divId).style.display == ''none'')

    {

    document.getElementById(divId).style.display=''block'';

    }

    else

    {

    document.getElementById(divId).style.display = ''none'';

    }

    drawVisualization;

    }

    google.setOnLoadCallback(drawVisualization);

    </script>

    </head>

    <body style="font-family: Arial;border: 0 none;">

    <div id="chart1" style="width:90%; height: 400px;"></div>

    <input id="ShowHideData" type="button" value="Show/Hide Data" onclick="ShowHide(''table'')" />

    <div id="table" style="DISPLAY: none"></div>

    <div id="chart2" style="width:90%; height: 200px;"></div>

    </body>

    </html>'

    SELECT [dbaadmin].[dbo].[dbaudf_FileAccess_Write](@HTMLOutput,'C:\temp\table.html',1,1)

    Which generates this output....

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

    <title>

    Getty Images Opperations Report

    </title>

    <script type="text/javascript" src="http://www.google.com/jsapi"></script>

    <script type="text/javascript">

    google.load('visualization', '1', {packages: ['table','corechart']});

    </script>

    <script type="text/javascript">

    function drawVisualization() {

    // Create and populate the data table.

    var data = new google.visualization.DataTable();

    data.addColumn('datetime', 'Event');

    data.addColumn('number', 'SQL');

    data.addColumn('number', 'IDLE');

    data.addColumn('number', 'OTHER');

    data.addRows([

    [ new Date(2013,06,20,16,33,13),0,99,1],

    [ new Date(2013,06,20,16,32,13),0,98,2],

    [ new Date(2013,06,20,16,31,13),0,94,6],

    [ new Date(2013,06,20,16,30,13),0,96,4],

    [ new Date(2013,06,20,16,29,13),0,98,2],

    [ new Date(2013,06,20,16,28,13),0,99,1],

    [ new Date(2013,06,20,16,27,13),0,98,2],

    [ new Date(2013,06,20,16,26,12),0,99,1],

    [ new Date(2013,06,20,16,25,12),0,98,2],

    [ new Date(2013,06,20,16,24,12),0,98,2],

    [ new Date(2013,06,20,16,23,12),0,99,1],

    [ new Date(2013,06,20,16,22,12),0,98,2],

    [ new Date(2013,06,20,16,21,12),0,99,1],

    [ new Date(2013,06,20,16,20,12),0,98,2],

    [ new Date(2013,06,20,16,19,12),0,98,2],

    [ new Date(2013,06,20,16,18,12),0,99,1],

    [ new Date(2013,06,20,16,17,12),0,98,2],

    [ new Date(2013,06,20,16,16,12),0,94,6],

    [ new Date(2013,06,20,16,15,11),0,97,3],

    [ new Date(2013,06,20,16,14,11),0,98,2],

    [ new Date(2013,06,20,16,13,11),0,99,1],

    [ new Date(2013,06,20,16,12,11),0,98,2],

    [ new Date(2013,06,20,16,11,11),0,99,1],

    [ new Date(2013,06,20,16,10,11),0,97,3],

    [ new Date(2013,06,20,16,09,11),0,98,2],

    [ new Date(2013,06,20,16,08,11),0,99,1],

    [ new Date(2013,06,20,16,07,11),0,98,2],

    [ new Date(2013,06,20,16,06,11),0,99,1],

    [ new Date(2013,06,20,16,05,11),0,98,2],

    [ new Date(2013,06,20,16,04,10),0,96,4],

    [ new Date(2013,06,20,16,03,10),0,98,2],

    [ new Date(2013,06,20,16,02,10),0,98,2],

    [ new Date(2013,06,20,16,01,10),0,94,6],

    [ new Date(2013,06,20,16,00,10),1,96,3],

    [ new Date(2013,06,20,15,59,10),0,98,2],

    [ new Date(2013,06,20,15,58,10),0,98,2],

    [ new Date(2013,06,20,15,57,10),0,98,2],

    [ new Date(2013,06,20,15,56,10),0,99,1],

    [ new Date(2013,06,20,15,55,10),0,98,2],

    [ new Date(2013,06,20,15,54,10),0,98,2],

    [ new Date(2013,06,20,15,53,10),0,98,2],

    [ new Date(2013,06,20,15,52,09),0,98,2],

    [ new Date(2013,06,20,15,51,09),0,98,2],

    [ new Date(2013,06,20,15,50,09),0,98,2],

    [ new Date(2013,06,20,15,49,09),0,98,2],

    [ new Date(2013,06,20,15,48,09),0,99,1],

    [ new Date(2013,06,20,15,47,09),0,98,2],

    [ new Date(2013,06,20,15,46,09),0,94,6],

    [ new Date(2013,06,20,15,45,09),0,97,3],

    [ new Date(2013,06,20,15,44,09),0,98,2],

    [ new Date(2013,06,20,15,43,09),0,99,1],

    [ new Date(2013,06,20,15,42,09),0,98,2],

    [ new Date(2013,06,20,15,41,08),0,99,1],

    [ new Date(2013,06,20,15,40,08),0,98,2],

    [ new Date(2013,06,20,15,39,08),0,98,2],

    [ new Date(2013,06,20,15,38,08),0,98,2],

    [ new Date(2013,06,20,15,37,08),0,98,2],

    [ new Date(2013,06,20,15,36,08),0,99,1],

    [ new Date(2013,06,20,15,35,08),0,98,2],

    [ new Date(2013,06,20,15,34,08),0,98,2],

    [ new Date(2013,06,20,15,33,08),0,99,1],

    [ new Date(2013,06,20,15,32,08),0,98,2],

    [ new Date(2013,06,20,15,31,08),0,93,7],

    [ new Date(2013,06,20,15,30,07),0,97,3],

    [ new Date(2013,06,20,15,29,07),0,98,2],

    [ new Date(2013,06,20,15,28,07),0,99,1],

    [ new Date(2013,06,20,15,27,07),0,98,2],

    [ new Date(2013,06,20,15,26,07),0,98,2],

    [ new Date(2013,06,20,15,25,07),0,98,2],

    [ new Date(2013,06,20,15,24,07),0,98,2],

    [ new Date(2013,06,20,15,23,07),0,99,1],

    [ new Date(2013,06,20,15,22,07),0,98,2],

    [ new Date(2013,06,20,15,21,07),0,98,2],

    [ new Date(2013,06,20,15,20,07),0,98,2],

    [ new Date(2013,06,20,15,19,06),0,98,2],

    [ new Date(2013,06,20,15,18,06),0,99,1],

    [ new Date(2013,06,20,15,17,06),0,98,2],

    [ new Date(2013,06,20,15,16,06),0,93,7],

    [ new Date(2013,06,20,15,15,06),0,97,3],

    [ new Date(2013,06,20,15,14,06),0,98,2],

    [ new Date(2013,06,20,15,13,06),0,99,1],

    [ new Date(2013,06,20,15,12,06),0,98,2],

    [ new Date(2013,06,20,15,11,06),0,99,1],

    [ new Date(2013,06,20,15,10,06),0,97,3],

    [ new Date(2013,06,20,15,09,06),0,97,3],

    [ new Date(2013,06,20,15,08,05),0,99,1],

    [ new Date(2013,06,20,15,07,05),0,98,2],

    [ new Date(2013,06,20,15,06,05),0,98,2],

    [ new Date(2013,06,20,15,05,05),0,98,2],

    [ new Date(2013,06,20,15,04,05),0,98,2],

    [ new Date(2013,06,20,15,03,05),0,99,1],

    [ new Date(2013,06,20,15,02,05),0,98,2],

    [ new Date(2013,06,20,15,01,05),0,93,7],

    [ new Date(2013,06,20,15,00,05),0,97,3],

    [ new Date(2013,06,20,14,59,05),0,98,2],

    [ new Date(2013,06,20,14,58,05),0,99,1],

    [ new Date(2013,06,20,14,57,04),0,98,2],

    [ new Date(2013,06,20,14,56,04),0,99,1],

    [ new Date(2013,06,20,14,55,04),0,98,2],

    [ new Date(2013,06,20,14,54,04),0,98,2],

    [ new Date(2013,06,20,14,53,04),0,99,1],

    [ new Date(2013,06,20,14,52,04),0,98,2],

    [ new Date(2013,06,20,14,51,04),0,99,1],

    [ new Date(2013,06,20,14,50,04),0,98,2],

    [ new Date(2013,06,20,14,49,04),0,98,2],

    [ new Date(2013,06,20,14,48,04),0,99,1],

    [ new Date(2013,06,20,14,47,04),0,98,2],

    [ new Date(2013,06,20,14,46,03),0,93,7],

    [ new Date(2013,06,20,14,45,03),0,98,2],

    [ new Date(2013,06,20,14,44,03),0,98,2],

    [ new Date(2013,06,20,14,43,03),0,98,2],

    [ new Date(2013,06,20,14,42,03),0,98,2],

    [ new Date(2013,06,20,14,41,03),0,98,2],

    [ new Date(2013,06,20,14,40,03),0,98,2],

    [ new Date(2013,06,20,14,39,03),0,98,2],

    [ new Date(2013,06,20,14,38,03),0,98,2],

    [ new Date(2013,06,20,14,37,03),0,98,2],

    [ new Date(2013,06,20,14,36,03),0,98,2],

    [ new Date(2013,06,20,14,35,02),0,98,2],

    [ new Date(2013,06,20,14,34,02),0,98,2],

    [ new Date(2013,06,20,14,33,02),0,99,1],

    [ new Date(2013,06,20,14,32,02),0,98,2],

    [ new Date(2013,06,20,14,31,02),0,93,7],

    [ new Date(2013,06,20,14,30,02),0,98,2],

    [ new Date(2013,06,20,14,29,02),0,98,2],

    [ new Date(2013,06,20,14,28,02),0,98,2],

    [ new Date(2013,06,20,14,27,02),0,98,2],

    [ new Date(2013,06,20,14,26,02),0,98,2],

    [ new Date(2013,06,20,14,25,02),0,99,1],

    [ new Date(2013,06,20,14,24,01),0,98,2],

    [ new Date(2013,06,20,14,23,01),0,99,1],

    [ new Date(2013,06,20,14,22,01),0,98,2],

    [ new Date(2013,06,20,14,21,01),0,98,2],

    [ new Date(2013,06,20,14,20,01),0,98,2],

    [ new Date(2013,06,20,14,19,01),0,98,2],

    [ new Date(2013,06,20,14,18,01),0,99,1],

    [ new Date(2013,06,20,14,17,01),0,97,3],

    [ new Date(2013,06,20,14,16,01),0,93,7],

    [ new Date(2013,06,20,14,15,01),0,99,1],

    [ new Date(2013,06,20,14,14,01),0,98,2],

    [ new Date(2013,06,20,14,13,01),0,99,1],

    [ new Date(2013,06,20,14,12,00),0,99,1],

    [ new Date(2013,06,20,14,11,00),0,98,2],

    [ new Date(2013,06,20,14,10,00),0,98,2],

    [ new Date(2013,06,20,14,09,00),0,98,2],

    [ new Date(2013,06,20,14,08,00),0,99,1],

    [ new Date(2013,06,20,14,07,00),0,98,2],

    [ new Date(2013,06,20,14,06,00),0,98,2],

    [ new Date(2013,06,20,14,05,00),0,99,1],

    [ new Date(2013,06,20,14,04,00),0,97,3],

    [ new Date(2013,06,20,14,03,00),0,99,1],

    [ new Date(2013,06,20,14,02,00),0,98,2],

    [ new Date(2013,06,20,14,00,59),1,92,7],

    [ new Date(2013,06,20,13,59,59),0,98,2],

    [ new Date(2013,06,20,13,58,59),0,98,2],

    [ new Date(2013,06,20,13,57,59),0,99,1],

    [ new Date(2013,06,20,13,56,59),0,98,2],

    [ new Date(2013,06,20,13,55,59),0,98,2],

    [ new Date(2013,06,20,13,54,59),0,98,2],

    [ new Date(2013,06,20,13,53,59),0,98,2],

    [ new Date(2013,06,20,13,52,59),0,99,1],

    [ new Date(2013,06,20,13,51,59),0,98,2],

    [ new Date(2013,06,20,13,50,59),0,98,2],

    [ new Date(2013,06,20,13,49,58),0,98,2],

    [ new Date(2013,06,20,13,48,58),0,98,2],

    [ new Date(2013,06,20,13,47,58),0,99,1],

    [ new Date(2013,06,20,13,46,58),0,98,2],

    [ new Date(2013,06,20,13,45,58),0,92,8],

    [ new Date(2013,06,20,13,44,58),0,98,2],

    [ new Date(2013,06,20,13,43,58),0,98,2],

    [ new Date(2013,06,20,13,42,58),0,99,1],

    [ new Date(2013,06,20,13,41,58),0,98,2],

    [ new Date(2013,06,20,13,40,58),0,98,2],

    [ new Date(2013,06,20,13,39,58),0,99,1],

    [ new Date(2013,06,20,13,38,57),0,98,2],

    [ new Date(2013,06,20,13,37,57),0,99,1],

    [ new Date(2013,06,20,13,36,57),0,99,1],

    [ new Date(2013,06,20,13,35,57),0,98,2],

    [ new Date(2013,06,20,13,34,57),0,99,1],

    [ new Date(2013,06,20,13,33,57),0,98,2],

    [ new Date(2013,06,20,13,32,57),0,99,1],

    [ new Date(2013,06,20,13,31,57),0,99,1],

    [ new Date(2013,06,20,13,30,57),0,92,8],

    [ new Date(2013,06,20,13,29,57),0,99,1],

    [ new Date(2013,06,20,13,28,57),0,96,4],

    [ new Date(2013,06,20,13,27,56),0,95,5],

    [ new Date(2013,06,20,13,26,56),0,97,3],

    [ new Date(2013,06,20,13,25,56),0,98,2],

    [ new Date(2013,06,20,13,24,56),0,99,1],

    [ new Date(2013,06,20,13,23,56),0,98,2],

    [ new Date(2013,06,20,13,22,56),0,95,5],

    [ new Date(2013,06,20,13,21,56),0,95,5],

    [ new Date(2013,06,20,13,20,56),0,98,2],

    [ new Date(2013,06,20,13,19,56),0,99,1],

    [ new Date(2013,06,20,13,18,56),0,98,2],

    [ new Date(2013,06,20,13,17,56),0,98,2],

    [ new Date(2013,06,20,13,16,55),0,97,3],

    [ new Date(2013,06,20,13,15,55),0,92,8],

    [ new Date(2013,06,20,13,14,55),0,98,2],

    [ new Date(2013,06,20,13,13,55),0,98,2],

    [ new Date(2013,06,20,13,12,55),0,99,1],

    [ new Date(2013,06,20,13,11,55),0,98,2],

    [ new Date(2013,06,20,13,10,55),0,98,2],

    [ new Date(2013,06,20,13,09,55),0,99,1],

    [ new Date(2013,06,20,13,08,55),0,98,2],

    [ new Date(2013,06,20,13,07,55),0,99,1],

    [ new Date(2013,06,20,13,06,55),0,98,2],

    [ new Date(2013,06,20,13,05,55),0,98,2],

    [ new Date(2013,06,20,13,04,54),0,99,1],

    [ new Date(2013,06,20,13,03,54),0,98,2],

    [ new Date(2013,06,20,13,02,54),0,99,1],

    [ new Date(2013,06,20,13,01,54),0,98,2],

    [ new Date(2013,06,20,13,00,54),1,92,7],

    [ new Date(2013,06,20,12,59,54),0,99,1],

    [ new Date(2013,06,20,12,58,54),0,98,2],

    [ new Date(2013,06,20,12,57,54),0,99,1],

    [ new Date(2013,06,20,12,56,54),0,99,1],

    [ new Date(2013,06,20,12,55,54),0,98,2],

    [ new Date(2013,06,20,12,54,54),0,99,1],

    [ new Date(2013,06,20,12,53,53),0,98,2],

    [ new Date(2013,06,20,12,52,53),0,98,2],

    [ new Date(2013,06,20,12,51,53),0,99,1],

    [ new Date(2013,06,20,12,50,53),0,98,2],

    [ new Date(2013,06,20,12,49,53),0,99,1],

    [ new Date(2013,06,20,12,48,53),0,98,2],

    [ new Date(2013,06,20,12,47,53),0,98,2],

    [ new Date(2013,06,20,12,46,53),0,98,2],

    [ new Date(2013,06,20,12,45,53),0,92,8],

    [ new Date(2013,06,20,12,44,53),0,99,1],

    [ new Date(2013,06,20,12,43,53),0,98,2],

    [ new Date(2013,06,20,12,42,52),0,99,1],

    [ new Date(2013,06,20,12,41,52),0,99,1],

    [ new Date(2013,06,20,12,40,52),0,98,2],

    [ new Date(2013,06,20,12,39,52),0,99,1],

    [ new Date(2013,06,20,12,38,52),0,98,2],

    [ new Date(2013,06,20,12,37,52),0,98,2],

    [ new Date(2013,06,20,12,36,52),0,99,1],

    [ new Date(2013,06,20,12,35,52),0,98,2],

    [ new Date(2013,06,20,12,34,52),0,99,1],

    [ new Date(2013,06,20,12,33,52),0,98,2],

    [ new Date(2013,06,20,12,32,52),0,98,2],

    [ new Date(2013,06,20,12,31,51),0,98,2],

    [ new Date(2013,06,20,12,30,51),0,93,7],

    [ new Date(2013,06,20,12,29,51),0,98,2],

    [ new Date(2013,06,20,12,28,51),0,98,2],

    [ new Date(2013,06,20,12,27,51),0,98,2],

    [ new Date(2013,06,20,12,26,51),0,99,1],

    [ new Date(2013,06,20,12,25,51),0,98,2],

    [ new Date(2013,06,20,12,24,51),0,99,1],

    [ new Date(2013,06,20,12,23,51),0,98,2],

    [ new Date(2013,06,20,12,22,51),0,98,2],

    [ new Date(2013,06,20,12,21,51),0,99,1],

    [ new Date(2013,06,20,12,20,50),0,98,2],

    [ new Date(2013,06,20,12,19,50),0,99,1],

    [ new Date(2013,06,20,12,18,50),0,98,2],

    [ new Date(2013,06,20,12,17,50),0,98,2],

    ]);

    var chart1 = new google.visualization.AreaChart(document.getElementById('chart1'));

    var options1 = {isStacked: true,

    height: 400,

    legend: "bottom",

    title: 'CPU History',

    vAxis: {title: "% CPU"},

    hAxis: {title: "Date"}

    };

    var table = new google.visualization.Table(document.getElementById('table'));

    var dataView = new google.visualization.DataView(data);

    // Create and draw the visualization.

    dataView.setColumns([0,1,2,3]);

    chart1.draw(data, options1);

    table.draw(data, null);

    }

    function ShowHide(divId)

    {

    if(document.getElementById(divId).style.display == 'none')

    {

    document.getElementById(divId).style.display='block';

    }

    else

    {

    document.getElementById(divId).style.display = 'none';

    }

    drawVisualization;

    }

    google.setOnLoadCallback(drawVisualization);

    </script>

    </head>

    <body style="font-family: Arial;border: 0 none;">

    <div id="chart1" style="width:90%; height: 400px;"></div>

    <input id="ShowHideData" type="button" value="Show/Hide Data" onclick="ShowHide('table')" />

    <div id="table" style="DISPLAY: none"></div>

    <div id="chart2" style="width:90%; height: 200px;"></div>

    </body>

    </html>

    and here is an example...

  • mister.magoo

    SSC-Forever

    Points: 47068

    steve.ledridge (6/20/2013)


    As a side note, I also came up with some T-SQL that will generate HTML Charts using Google Charts.

    That is very nice - thanks for sharing :w00t:

    MM



    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);

  • Forum Etiquette: How to post Reporting Services problems
  • [/url]
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • [/url]
  • How to Post Performance Problems - by Gail Shaw
  • [/url]

  • SQL-DBA

    Hall of Fame

    Points: 3004

    Wow, I never even thought about doing charts like this. I just wrote a .NET script to do something very similar with Google Maps. I see from your approach that it would have been completely possible with T-SQL. Nice.

  • Viewing 15 posts - 16 through 30 (of 83 total)

    You must be logged in to reply to this topic. Login to reply