• I had the same situation as posted with the results not being returned as expected, except the results weren't returned at all. I am running SQL 2012 Enterprise 64-bit 11.0.5556 (SP2 + CU3). Adding the extra parameter to the send email call immediately returned the results as an attachment.

    This solution is an awesome combination of Google Charts and dynamic local data.

    I had previously wrapped Google Charts with an ASPX page that called a variable stored procedure using a combination of query string and config file settings. The stored procedure returns a dataset using FOR XML, with a structure I specify. The ASPX page reads the XML elements and populates the required Google Chart values, outputting dynamic local data rendered in the requested chart format. For a variety of reasons, the dashboard I created contains IFRAMEs which each call their own instance of the ASPX page. Technically, a dashboard can be created from a single HTML/ASPX page with multiple charts included (per the Google dev info and examples).

    I also created an SSRS report for SQL Agent job and step durations and statuses. I implemented it as a custom report that I run through SSMS from my local PC. The only down side is that it requires a stored procedure and UDF in the msdb database on each server it runs against, although the code is nicely encapsulated.

    I've already made a few tweaks to the JobTimeline SQL to show jobs and job steps instead of categories and jobs, and I got the emailed attachment to work (it opens in IE just fine!). I'm very excited to research other options, including combining the techniques you've demonstrated, the timeline chart, and the ASPX page that supports query string and config setting parameters.

    Thanks for posting this!

    J Pratt