change the font and text size of the results

  • Hi,

    how i can change the font and text size in the results of the select statement?

    (simple script from BOL)

    THX

    DECLARE @tableHTML NVARCHAR(MAX) ;

    SET @tableHTML =

    N'<H1>Work Order Report</H1>' +

    N'<table border="1">' +

    N'<tr><th>Work Order ID</th><th>Product ID</th>' +

    N'<th>Name</th><th>Order Qty</th><th>Due Date</th>' +

    N'<th>Expected Revenue</th></tr>' +

    CAST ( ( SELECT td = wo.WorkOrderID, '',

    td = p.ProductID, '',

    td = p.Name, '',

    td = wo.OrderQty, '',

    td = wo.DueDate, '',

    td = (p.ListPrice - p.StandardCost) * wo.OrderQty

    FROM AdventureWorks.Production.WorkOrder as wo

    JOIN AdventureWorks.Production.Product AS p

    ON wo.ProductID = p.ProductID

    WHERE DueDate > '2004-04-30'

    AND DATEDIFF(dd, '2004-04-30', DueDate) < 2

    ORDER BY DueDate ASC,

    (p.ListPrice - p.StandardCost) * wo.OrderQty DESC

    FOR XML PATH('tr'), TYPE

    ) AS NVARCHAR(MAX) ) +

    N'</table>' ;

    EXEC msdb.dbo.sp_send_dbmail @recipients='danw@Adventure-Works.com',

    @subject = 'Work Order List',

    @body = @tableHTML,

    @body_format = 'HTML' ;

  • Did you try Tools -> Options -> Environment -> Fonts and Colors?

  • I doubt if it's possible for result pan 🙁

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • It's totally possible- I tested it successfully!

  • what i meant is the email that sent to me i want to change the font size and color.

    THX

  • since you're building an HTML formatted email body, it would seem to me that you could embed your font/color tags in that...

  • can you show me little example that i can progress with it?

    THX

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply