Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
541 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | SSRS Reporting Services (99 exercises) |
Topic ==> | Basic Custom Assemblies (2 exercises) |
Level ==> | Average difficulty |
Subject ==> | SSRS training |
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.
The aim of this exercise (which you can do using either VB or C#) is to change the fill colour of the rows of a table whenever the certificate changes:
Whenever the certificate changes, we swap colour.
To do this, create a report called Blue in parts, and within this create a basic table above. Eventually you'll set the back colour of each row to be an expression similar to:
However, we have to write the BackColour function first! To make a start on this, in your VB class create the following private variables and constants:
'the current certificate, whose name we are monitoring
Private Shared CurrentCertificate As String = ""
'whether to use the first colour or the second
Private Shared IfFirstColour As Boolean = True
'the two colours to use
Private Const FirstColour As String = "#FFEEFF"
Private Const SecondColour As String = "#EEFFEE"
Alternatively, if you're using C#:
// the current certificate, whose name we are monitoring
private static string CurrentCertificate = "";
// whether to use the first colour or the second
private static bool IfFirstColour = true;
// the two colours to use
private const string FirstColour = "#FFEEFF";
private const string SecondColour = "#EEFFEE";
Write a function called BackColour which spits out either the value of FirstColour or SecondColour, given a certificate name.
For each certificate you should compare its name to the one held in the variable CurrentCertificate. If they're not the same, you should reset the value of the IfFirstColour flag, then reset CurrentCertificate to be the latest certificate name ready for the next call to the function.
When (if?) you've got all of this written and built, see if you can get your report working as shown at the start of this exercise!
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.