date parameter & Switch statement for changing cell color?

  • Hi Gurus,

    I am developing reports on reporting services 2005. I need to provide a daily report which has

    @startdate & @end date from query

    Q....I want to make a date parameter in report which actually should make the query run automatically for last 24 hours, when the user clicks the report and S/he need not enter Startdate & enddate. What should be the expression/properties?

    Q...I want to make a case/switch statement in SSRS when the background color of the cell turns red or green depending on value, Some of these values can be yes, no, Pass, 20.00. I mean characters as well as numbers..Please advise

    Thank you

  • SQLNW (12/23/2010)


    Hi Gurus,

    I am developing reports on reporting services 2005. I need to provide a daily report which has

    @startdate & @end date from query

    Q....I want to make a date parameter in report which actually should make the query run automatically for last 24 hours, when the user clicks the report and S/he need not enter Startdate & enddate. What should be the expression/properties?

    Q...I want to make a case/switch statement in SSRS when the background color of the cell turns red or green depending on value, Some of these values can be yes, no, Pass, 20.00. I mean characters as well as numbers..Please advise

    Thank you

    The first question is pretty straightforward. Look up the DateAdd functionality in Books online (SQL Servers help files). that shold help with the defaulting to the proper dates. Also take a look at the Today() and Now() functions.

    With the Second question, Can all of those values(yes, no, Pass, 20.00) occur in the same column or do they occur in different columns? If different columns then you can use the IIF or Switch functions to evaluate them. Here is an example for a column where a decimal value less than 20.00 gets a red color. This is not checked for syntax, and only meant as an example...

    =IIF(fields!column1.value < 20.00,"Red","Green")

    Otherwise if you could provide a bit more sample data it would be helpful as you'd basically need to code for anything you could possibly see and they add an Else catchall for anything you haven't already accounted for.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply