How to: Create a Sparkline in a Table (Report Builder 3.0 Video)
Applies to: Report Builder 3.0 |
Author: Maggie Sparkman, Microsoft Corporation |
Length: 00:05:36 Size: 11 Mb Type: WMV file |
Video Summary
This video demonstrates creating a table in Report Builder and adding a sparkline chart to it. Sparklines are small, simple charts that convey a lot of information in a little space.
The video uses data from a hard-coded query located in this transcript, so you can follow along. Go directly to the hard-coded query.
Video Transcript
Video |
Audio |
---|---|
00:05 Introduction |
Hello, my name is Maggie Sparkman. I’m a technical writer for Microsoft SQL Server Reporting Services. In this video, I’m going to demonstrate creating a sparkline chart in a table. Sparklines are little charts that pack a lot of information into a small space. In this case they’ll be used for comparing these products in my table. In this video here are the steps I’m going to run through:
The main thing I want to point out is that you, too, can create this report. This transcript contains the hard-coded query that you need to copy. For more information about what you will need in order to complete the report, see Prerequisites for Tutorials (Report Builder 3.0). |
00:59 Create a report and run the ‘Table or Matrix Wizard’ |
OK, here we are in SharePoint Server 2010.
|
02:17 Save the report |
So here it is.
|
02:36 Format the numbers |
I am going to fix up the formatting.
|
02:54 Insert a sparkline |
I am going to insert the sparkline in the table.
|
03:40 Attach data to the sparkline |
Now I attach data to the sparkline.
|
03:53 Run the report |
There it is. You see we have four columns in the first two sparklines, and five columns in the third one. This matches the number of values in the chart, because there are some blanks. But the columns in the sparklines should line up. |
04:07 Align the sparklines horizontally |
I’m going to make the columns in the sparkline line up horizontally.
|
04:22 Run the report |
That looks better. This time there are spaces in the sparkline to match the spaces in the data. Notice that the largest bar in each sparkline is the maximum height, even though the largest value in one row is $21,900 and the largest value in another row is only $13,350. |
04:40 Align the sparklines vertically |
I’m going to set the height of the bars in each sparkline to be relative to the height of the bars in the other sparklines.
|
04:55 Run the report |
There we go. Now we have spaces where there are no values, and the height of the bars in the sparklines are relative to each other.
|
05:05 Thanks! |
Thanks for watching! Check out the other resources in this transcript page. |
Hard-Coded Query
SELECT CAST('2010-01-04' AS date) as SalesDate,
'Carrying Case' as Product, CAST(1500.00 AS money) AS Sales, 20 as Quantity
UNION SELECT CAST('2010-01-05' AS date) as SalesDate,
'Carrying Case' as Product, CAST(1275.00 AS money) AS Sales, 17 as Quantity
UNION SELECT CAST('2010-01-08' AS date) as SalesDate,
'Carrying Case' as Product, CAST(5100.00 AS money) AS Sales, 68 as Quantity
UNION SELECT CAST('2010-01-04' AS date) as SalesDate,
'Carrying Case' as Product, CAST(1350.00 AS money) AS Sales, 18 as Quantity
UNION SELECT CAST('2010-01-06' AS date) as SalesDate,
'Carrying Case' as Product, CAST(1425.00 AS money) AS Sales, 19 as Quantity
UNION SELECT CAST('2010-01-06' AS date) as SalesDate,
'Carrying Case' as Product, CAST(5625.00 AS money) AS Sales, 75 as Quantity
UNION SELECT CAST('2010-01-06' AS date) as SalesDate,
'Carrying Case' as Product, CAST(6300.00 AS money) AS Sales, 84 as Quantity
UNION SELECT CAST('2010-01-05' AS date) as SalesDate,
'Carrying Case' as Product, CAST(2025.00 AS money) AS Sales, 27 as Quantity
UNION SELECT CAST('2010-01-08' AS date) as SalesDate,
'Carrying Case' as Product, CAST(3750.00 AS money) AS Sales, 50 as Quantity
UNION SELECT CAST('2010-01-04' AS date) as SalesDate,
'Budget Movie-Maker' as Product, CAST(2700.00 AS money) AS Sales, 9 as Quantity
UNION SELECT CAST('2010-01-07' AS date) as SalesDate,
'Budget Movie-Maker' as Product, CAST(3000.00 AS money) AS Sales, 10 as Quantity
UNION SELECT CAST('2010-01-04' AS date) as SalesDate,
'Budget Movie-Maker' as Product, CAST(1800.00 AS money) AS Sales, 6 as Quantity
UNION SELECT CAST('2010-01-04' AS date) as SalesDate,
'Budget Movie-Maker' as Product, CAST(7800.00 AS money) AS Sales, 26 as Quantity
UNION SELECT CAST('2010-01-08' AS date) as SalesDate,
'Budget Movie-Maker' as Product, CAST(3900.00 AS money) AS Sales, 13 as Quantity
UNION SELECT CAST('2010-01-06' AS date) as SalesDate,
'Budget Movie-Maker' as Product, CAST(780.00 AS money) AS Sales, 26 as Quantity
UNION SELECT CAST('2010-01-07' AS date) as SalesDate,
'Budget Movie-Maker' as Product, CAST(13200.00 AS money) AS Sales, 44 as Quantity
UNION SELECT CAST('2010-01-08' AS date) as SalesDate,
'Budget Movie-Maker' as Product, CAST(18000.00 AS money) AS Sales, 60 as Quantity
UNION SELECT CAST('2010-01-06' AS date) as SalesDate,
'Budget Movie-Maker' as Product, CAST(5400.00 AS money) AS Sales, 18 as Quantity
UNION SELECT CAST('2010-01-06' AS date) as SalesDate,
'Budget Movie-Maker' as Product, CAST(6000.00 AS money) AS Sales, 20 as Quantity
UNION SELECT CAST('2010-01-07' AS date) as SalesDate,
'Slim Digital' as Product, CAST(2550.00 AS money) AS Sales, 17 as Quantity
UNION SELECT CAST('2010-01-04' AS date) as SalesDate,
'Slim Digital' as Product, CAST(2700.00 AS money) AS Sales, 18 as Quantity
UNION SELECT CAST('2010-01-08' AS date) as SalesDate,
'Slim Digital' as Product, CAST(3450.00 AS money) AS Sales, 23 as Quantity
UNION SELECT CAST('2010-01-06' AS date) as SalesDate,
'Slim Digital' as Product, CAST(6600.00 AS money) AS Sales, 44 as Quantity
UNION SELECT CAST('2010-01-05' AS date) as SalesDate,
'Slim Digital' as Product, CAST(2250.00 AS money) AS Sales, 15 as Quantity
UNION SELECT CAST('2010-01-05' AS date) as SalesDate,
'Slim Digital' as Product, CAST(6000.00 AS money) AS Sales, 40 as Quantity
UNION SELECT CAST('2010-01-04' AS date) as SalesDate,
'Slim Digital' as Product, CAST(6000.00 AS money) AS Sales, 80 as Quantity
UNION SELECT CAST('2010-01-04' AS date) as SalesDate,
'Slim Digital' as Product, CAST(13200.00 AS money) AS Sales, 88 as Quantity
UNION SELECT CAST('2010-01-08' AS date) as SalesDate,
'Slim Digital' as Product, CAST(7650.00 AS money) AS Sales, 51 as Quantity
UNION SELECT CAST('2010-01-06' AS date) as SalesDate,
'Slim Digital' as Product, CAST(5100.00 AS money) AS Sales, 34 as Quantity
See Also