Wrox Home  
Professional SQL Server 2005 Reporting Services
by Paul Turley, Todd Bryant, James Counihan, Dave DuVarney
March 2006, Paperback

Sparklines - Sales Trends

This example shows product category sales on each row and sales by year in an associated line chart, plotting sales totals by month. This report's dataset is based on a simple query that returns aggregated sales by year, month, and then by product category.

In Figure 9, I've added and setup the table and chart in separate areas of the report body. They're both bound to the same dataset. After the table is configured, I'll add it to the table. Like the previous example, a group header row is used in-place of the detail row.

Figure 9

I've configured the chart with no gridlines or labels at all. Its purpose is to show relative sales trends, not specific values. In a production reporting solution, I might create separate chart report, similar to the sparkline chart but with more detail. Figure 10 shows this report in design view.

Figure 10

Finally, Figure 11 shows the finished report. The trend line shows sales total over the course of the year. Whether data point represented days, weeks or months, the effect would be the same.

Figure 11

This article is the third in a series of 3 articles from Paul Turley excerpted from the 90-page chapter, "Report Solution Patterns and Recipes" from the book Professional SQL Server 2005 Reporting Services written by Paul Turley, Dave DuVarney, James Counihan and Todd Bryant (Wrox, 2006, ISBN: 0-7645-8497-9). The full chapter contains a deep analysis of successful report projects, including project profiles, success factors, user discussions and scope management. Templates are provided to assist requirement gathering and management. The Report Recipes section of this chapter includes 19 specific examples of advanced report designs that implement custom coding and other techniques taught in previous chapters. This series of articles demonstrates 3 of these examples. The first article was Greenbar Reports and the second was Creating a Business ScoreCard. Hitachi Consulting has business and IT consulting offices throughout the world. Paul works for Hitachi's Pacific Northwest Business Intelligence practice in Seattle and may be contacted at pturley@hitachiconsulting.com.