SSRS Reporting Services | Expressions exercise | Expressions - director age and conditional format

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Software ==> SSRS Reporting Services  (99 exercises)
Version ==> SSRS 2012 and later
Topic ==> Expressions  (8 exercises)
Level ==> Harder than average
Subject ==> SSRS training
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Create a new report, and within this a dataset listing the following columns:

  • DirectorName (from the tblDirector table)
  • DirectorDob (from the tblDirector table)
  • FilmName (from the tblFilm table)
  • FilmReleaseDate (from the tblFilm table)

Apply a criteria to show only directors of films winning exactly 3 Oscars - this should give 4 rows.

Create a report to include an expression giving the age of each director at the time a film was released (see hint below), with a subtotal at the bottom showing the average director's age:

SQL Server Reporting Services 2008 R2 exercise - Expressions (image 1)

If you are over 40, your chances of directing a film may be slipping away

Use the expression builder to create the formula: =DateDiff("yyyy",Fields!DirectorDOB.Value,Fields!FilmReleaseDate.Value)

Apply conditional formatting so directors aged over 50 appear crossed out:

SQL Server Reporting Services 2008 R2 exercise - Expressions (image 2)

Set the TextDecoration property to LineThrough if the director is over 50

Save this report as Another door closes, then close it down.

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only.
This page has 0 threads Add post