April 30, 2014 at 10:30 am
In an SSRS 2008 existing report, I wouuld like a particular textbox to look like the following when there is data:
Checking: $57.35
In the same textbox when there is no amount, the textbox would look like the following:
Checking: $0.00
The following iif statement gets the dollar amount want to display:
=IIF(Fields!PaymentType.Value="Checking", sum(cdec(Fields!TransactionAmount.Value)),0)
However I would like to know how to write an iif statement that would include the wording
"Checking: " with the dollar amont that needs to be displayed.
I have tried concatentations that I can think of, but when the report runs, I get the #error in the location
I would like to see the wording "Checking:' with the dollar amount.
Thus can you show me an expression that would solve my problem?
April 30, 2014 at 10:39 am
Why not just have two textboxes? The first one has the string 'Checking' in it. The second one has the value. You can set the formatting property to C for currency.
April 30, 2014 at 1:23 pm
The textbook that I am asking about is located in a summary row. I do not another column to a detail report when it is not needed.
May 1, 2014 at 6:03 am
wendy elizabeth (4/30/2014)
The following iif statement gets the dollar amount want to display:=IIF(Fields!PaymentType.Value="Checking", sum(cdec(Fields!TransactionAmount.Value)),0)
However I would like to know how to write an iif statement that would include the wording
"Checking: " with the dollar amont that needs to be displayed.
I have tried concatentations that I can think of, but when the report runs, I get the #error in the location
I would like to see the wording "Checking:' with the dollar amount.
I don't have SSRS open right now, so the exact formula might be a little different, but have you tried something along the lines of:
="Checking: " & Format(IIF(Fields!PaymentType.Value="Checking", sum(cdec(Fields!TransactionAmount.Value)),0), "C2")
From the error your seeing, I would guess that you have to explicitly cast the results of your existing formula to a string in order to get it to work.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply