Questions tagged [ssrs-expression]

To set expression in SSRS Report. SSRS-Expressions are frequently used in SSRS Reports to control content and report appearance.

By this tag, user can get specific answer to SSRS Expression. It can help to solve SSRS Report Error/Issue.

225 questions
70
votes
14 answers

Reporting Services Remove Time from DateTime in Expression

I'm trying to populate an expression (default value of a parameter) with an explicit time. How do I remove the time from the the "now" function?
Jeff
  • 8,020
  • 34
  • 99
  • 157
51
votes
1 answer

Report Builder 3.0 SWITCH expression DEFAULT/ELSE

I am trying to display a different logo based on the users franchise number. Parameter = UserFranNr If the value <> 99 and <> 87, then the embedded image to display is ID0. (Embedded image names are strings.) This works with nested IIFs but seems to…
27
votes
6 answers

SSRS Field Expression to change the background color of the Cell

I'm trying to write a field expression for a Cell in my report where I have to change the background color of the cell depending on the string value in the cell. Ex: if the column has a value 'Approved' in it, the cell should show a green background…
Avinash
  • 1,273
  • 4
  • 16
  • 23
24
votes
5 answers

Using 'like' in ssrs expressions

I'm trying to highlight a field when the value has the word 'deadline' in it. I'm trying to use the expression: =IIf(Fields!Notes.Value like "%deadline%","Yellow","Transparent") in the BackgroundColor property. It's not highlighting the field (not…
22
votes
1 answer

SSRS Expression for IF, THEN ELSE

I am creating a field from tables with our shoretel phone system and i am intergrating reports via SSRS and i need some assisstance with an expression. =if(Fields!ExitReason.Value 7, then if (Fields!ExitReason.Value 1, else if…
22
votes
3 answers

Count expression SSRS Report

Trying to count all rows in a column where column=Yes I have two columns in my report Accepted and rejected. I'm trying to count the rows where accepted=Yes and do the say thing for rejected. I've tried…
Jt2ouan
  • 1,964
  • 9
  • 33
  • 55
20
votes
4 answers

SSRS Expression Divide by Zero Error

I have a tablix box that has a division expression. When dividing by zero or nulls I get #Error displayed in my report. I tried to create an IIF statement and tested with static values. This verified my syntax was correct but I still see the error…
d90
  • 767
  • 2
  • 10
  • 28
20
votes
1 answer

WHERE clause in SSRS expression

What's the syntax for inserting a WHERE clause in an SSRS expression? I am using BIDS 2008. =Sum(Fields!QuantityToShip.Value) WHERE FIELDS!Program.Value = "FC" The code listed above represents the logic I want to use, but obviously inserting the…
sion_corn
  • 3,043
  • 8
  • 39
  • 65
19
votes
7 answers

SSRS Expression: The value expression for textbox has scope parameter that is invalid for aggregate

i'm recieving the following error: Error 1 [rsInvalidAggregateScope] The Value expression for the text box ‘Textbox2’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that…
18
votes
3 answers

SSRS Sum Expression with Condition

I have a problem here, Have an SSRS report for Bank Transfer see attached I would like to add a row expression which will Sum the total amount of the same bank, i.e, 03001 - Standard Chartered Bank Ltd BJL, 03002 - Standard Chartered Bank Ltd sk…
Kelvin
  • 215
  • 1
  • 2
  • 5
16
votes
7 answers

SSRS Formula or expression to change NaN to 0

I am using the following expression to work out a percentage: =Fields!Days.Value/Sum(Fields!Days.Value, "Date_month_name") Days.Value is showing as 0 however in a few of my results instead of reading 0% in my percentage column it is actually…
JsonStatham
  • 9,770
  • 27
  • 100
  • 181
13
votes
1 answer

If value = null then " " else value SSRS EXPRESSION issues

value 1 is a retail price decimal value 2 is the difference between 2 retail costs both are decimals =IIF(Fields!Prorated.Value is null,"",Fields!Prorated.Value)-Fields!Retail.Value fixxed !!! Fixxed…
Cladback
  • 157
  • 1
  • 1
  • 9
9
votes
1 answer

How do I write an if else statement in Reporting Services expression language?

I would like to write a Reporting Services "Expression" that basically behaves as the following (pseudo code)... if ([Fields!StateProvinceId.Value] == 1) { return "Ontario"; } else if ([Fields!StateProvinceId.Value] == 2) { return…
Justin
  • 10,667
  • 15
  • 58
  • 79
9
votes
4 answers

RDLC Expression Extension Methods

Is it possible to write extension methods for expressions behind RDLC fields? For example, let's say that I have a DateTime field in my datasource that may either have a valid value or may be null. I drag and drop a TextBox onto my RDLC and format…
user284654
7
votes
1 answer

convert integer value to string and if it fails set "##" - SSRS

I have below line in crystal report formula, It means that if string conversion failed it will print ##. CStr({rptReport;1.Total},"##") Now, the question is how can I achieve this by SSRS Expression.
Pedram
  • 6,256
  • 10
  • 65
  • 87
1
2 3
14 15