Report Builder | Expressions exercise | Report with alternating row colours and flashing

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 ==> Report Builder  (42 exercises)
Version ==> RB 3 or RB 2016
Topic ==> Expressions  (5 exercises)
Level ==> Harder than average
Subject ==> Report Builder 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.

Open the report called The Directors in the above folder (or a version of the report that you have created yourself).  You may need to edit the data source of the report so that it points to the correct connection.

Amend the report so that alternate rows appear shaded:

Report Builder 3.0 exercise - Expressions (image 1)

See the notes below for how to achieve this effect

To make this work, note that RowNumber(Nothing) will give the row number of the current row - the Nothing signifies that you're taking the row number over the entire table, not some limited scope within it - and that 17 mod 3 equals 2, for example (ie you can use mod to calculate the remainder when you divide one number by another).

Too easy?  Set the Autorefresh property of the report to 1, and it will refresh itself automatically every second.  You can then set the background colour of the report to an expression which gives a different colour every second:

Report Builder 3.0 exercise - Expressions (image 2)

You may find the CHOOSE and SECOND functions useful to accomplish this

Save this report as Flashy Report, and go back to design view before you hurt your eyes!

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