Showing posts with label ssrs. Show all posts
Showing posts with label ssrs. Show all posts

Sunday, 25 April 2010

SSRS : Dynamically Changing Cell Colour

SSRS : Dynamically Changing Cell Colour

Reporting Services dynamic formatting is controlled by expressions. The SWITCH function is one method of implementing logic inside an expression (like TSQL's CASE statement).

To quote Books Online , SWITCH -
' Evaluates a list of expressions, and returns the value associated with the first condition that returns TRUE. Switch can have one or more condition/value pairs. '
So applying this in an expression to the BackgroundColor property of a cell  >

=Switch(First(Fields!Elapsed_Minutes.Value) < 30, "Green", First(Fields!Elapsed_Minutes.Value) < 60, "Yellow", First(Fields!Elapsed_Minutes.Value) >= 60, "Red", 1=1, "Transparent")

Breaking this example down, it uses the Elapsed_Minutes column and uses GREEN for values less than 30 minutes, YELLOW for values less than 60 minutes and RED for values over 60.
The 1=1 argument becomes true if none of the previous arguments are satisfied i.e Elapsed_Minutes is NULL / not present.

Friday, 12 February 2010

Adding an 'All' option to a SSRS parameter dropdown

Adding 'All' to a query to use in a parameter list -
SELECT * FROM (SELECT NULL AS DepartmentID, '' as Name) AllDepartments
UNION
SELECT DepartmentID, Name FROM HumanResources.Department ORDER BY Name

Use OR in the WHERE clause as follows to use te passed parameter -
ELECT DepartmentID, Name FROM HumanResources.Department 
WHERE (DepartmentID IS NULL) 
OR (DepartmentID = @DepartmentID)

Friday, 10 July 2009

SSRS - Reporting Services Formulae

For Reporting Services Parameters -

DateSerial - returns date format

=DateSerial(Year(Today()), Month(Today()), Day(Today()))



Useful link :
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=99696

Setting Default Date in SQL Reportng Services
http://weblogs.sqlteam.com/jhermiz/archive/2007/08/15/60289.aspx

Wednesday, 8 April 2009

SSRS 2008 : Reporting Services 2008

Had my first experience of installing Reporting Services 2008 last night.

I have 3 observations -
  1. It did not require a local MS SQL instance.
    I was able to install it and chose to place the ReportServer and ReportServerTempDB databases on another server.

  2. It no longer requires Microsoft's Internet Information Services (IIS) as a web server.

  3. Report Builder seems to reply on domain security hence I need to build my SSRS instance in the business domain, rather than the development one.