Sparklines in detail column

  • I am adding a column to an existing report that would show sparkline based on 6 columns values in each row. I am trying to crate the line charts but not getting anywhere. here is example of data:

    Period01, Period02, Period03,......Period06

    50, -10, 0,......30

    20, 5, -1,......33

    I want to add a column to house sparkline in the detail section.

    I am using ssrs 2k5

    TIA.

    kr.

  • You must have a column group to use sparklines.

    If you want to report on multiple periods, then design your data so that the periods can form the column group. This means your period names and values must come from separate rows, not from separate columns.

    eg

    The following data row cannot relate to a column group based on period

    Id, PeriodName1,PeriodValue1,PeriodName2,PeriodValue2,PeriodName2,PeriodValue3

    1,'Jan',20,'Feb',25,'Mar',22

    The following data rows can relate to a column group based on period

    Id,PeriodName,PeriodValue

    1,'Jan',20

    2,'Feb',25

    3,'Mar',22

    I found setting up my first sparkline was a painful experience with many false starts and confusion about what the documentation was saying. Eventually it worked, and really impressed the end users.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara

  • Thanks. I realized that requirement and changed the structure of the dataset to the one you mentioned. Actually, this was an existing report in which the stored procedure used to retrieve data was creating that pivot table structure for the report. I had to change that stored procedure to not create the pivot table but return data in actual format (that was similar to what you mentioned). That enabled me to add a sparklines column as well as the pivot table formatting inside the report (conditional display of data in a column).

    Thanks for your help.

Viewing 4 posts - 1 through 3 (of 3 total)

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