Business Intelligence Blogs

View blogs by industry experts on topics such as SSAS, SSIS, SSRS, Power BI, Performance Tuning, Azure, Big Data and much more! You can also sign up to post your own business intelligence blog.

Creating 5 Star Rating using Indicators in SSRS 2008 R2

  • 3 January 2012
  • Author: aseem.sb
  • Number of views: 6877
  • 0 Comments

 

Recently while browsing in MSDN forum, I was came across of this question. A person wanted to show 5 star rating kind of thing (just like we rate a particular blog in MSDN) in SSRS 2008 R2 using Indicators.

As we all know, Indicators is very nice feature introduced in SSRS 2008 R2 which give a very nice look and feel to any report. Here are the steps how we can create 5 star rating in SSRS 2008 R2.

Here, I am assuming that the field which is used for showing 5 star rating has values between 0-5 and also this can have decimal values like 2.5, 3.5 etc.

I have used following sample SQL Query for this report:

SELECT 'Blog0' Title, 0 Rating
UNION
SELECT 'Blog1' , 0.5 
UNION
SELECT 'Blog2', 1
UNION
SELECT 'Blog3', 1.5
UNION
SELECT 'Blog4', 2
UNION
SELECT 'Blog5', 2.5
UNION
SELECT 'Blog6' , 3
UNION
SELECT 'Blog7' , 3.5 
UNION
SELECT 'Blog8', 4
UNION
SELECT 'Blog9', 4.5
UNION
SELECT 'Blog10', 5

 

Steps:

  1. Create Dataset in report using above SQL query.
  2. Drag and drop table control on report from toolbox.
  3. Add Five columns to table to show five star indicators as shown in below image.
  4. Table
  5. Drag and drop indicator into each column of type Ratings (5 Star)
  6. Right Click on each indicator, go to Values and States tab and set following properties:
    1. Value = Filed which hold rating details
    2. States Measurement Unit = Numeric
  7. Now add three Indicator Icons under Indicator State section and set their properties as per below:
    1. First Icon = StarQautersNonFilled (Empty Star), Color = Yellow (You can change it)
    2. Second  Icon = StarQautersTwoFilled (Half Filled Star), Color = Yellow (You can change it)
    3. Third Icon = StarQautersAllFilled (Full filled Star), Color = Yellow (You can change it)
  8. Do above step for each indicator (5 Indicators) in table. Refer below Image
  9. ind
  10. Use below table to set Start value and End value of each icon in each indicator. Based on this value icons will shown:

Indicator

Icon

Start Value

End Value

Indicaor1

1 (Not filled)

0

0

Indicaor1

2 (Half Filled)

0.5

0.5

Indicaor1

3 (Full Filled)

1

5

Indicaor2

1 (Not filled)

0

1

Indicaor2

2 (Half Filled)

1.5

1.5

Indicaor2

3 (Full Filled)

2

5

Indicaor3

1 (Not filled)

0

2

Indicaor3

2 (Half Filled)

2.5

2.5

Indicaor3

3 (Full Filled)

3

5

Indicaor4

1 (Not filled)

0

3

Indicaor4

2 (Half Filled)

3.5

3.5

Indicaor4

3 (Full Filled)

4

5

Indicaor5

1 (Not filled)

0

4

Indicaor5

2 (Half Filled)

4.5

4.5

Indicaor5

3 (Full Filled)

5

 

Run report. You will something like below image

result

Well, this is my first attempt of writting, hope whoever reads it, find it helpful. Your comments are welcome.

Print
Categories: Reporting Services
Tags:
Rate this article:
2.5

aseem.sbaseem.sb

Other posts by aseem.sb

Please login or register to post comments.