This section describes the steps to design Sparkline
report using SSRS table report item.
The following dataset query is used for this Sparkline
report.
SELECT Prodcat.EnglishProductCategoryName,
prodSubcat.EnglishProductSubcategoryName,
prod.EnglishProductName,
prod.Color,
fact.[TotalProductCost],
fact.SalesAmount,
fact.TaxAmt,
fact.[OrderDate],
fact.[ShipDate]
FROM dbo.DimProduct as prod
INNER JOIN dbo.DimProductSubcategory AS prodSubcat ON
prod.ProductSubcategoryKey = prodSubcat.ProductSubcategoryKey
INNER JOIN dbo.DimProductCategory AS Prodcat ON
prodSubcat.ProductCategoryKey = Prodcat.ProductCategoryKey
INNER JOIN dbo.FactInternetSales AS fact ON
fact.ProductKey = prod.ProductKey
Refer Create Data section and create dataset using the above query.
AdventureWorksDW2014
database is used here.
EnglishProductSubcategoryName
field in the first cell as shown below.
Details group
in Row Groups
pane, now the respective tablix member properties will be listed in the properties panel.
Set Groups...
button in the properties panel. Now, the Grouping
dialog will be opened like below.
Add
button and select EnglishProductSubcategoryName
and click OK.
Sales
field in the second cell as shown below.
Sales
text box and assign the following expression =Sum(Fields!SalesAmount.Value)
in the cell.
Now, the report design will look like below.
Cannot insert a sparkline into a detail cell. Detail members can only contain the static inner members.
DATA
tab in properties panel.
TotalProductCost
field into Y-Values
section as shown below.
OrderDate
field into Column
section as shown below.
Now, the report design will look like below.
PROPERTIES
tab in the properties panel.Sales
series in the Choose Series
dropdown.
Data labels
, using Format
property. Set the '$'#,0;('$'#,0)
as value format property field.
Refer the Cell Properties to style the table cell.
On report preview, the report is showing sales amount progress from start year to till end.
Download the above report design from the link