Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

ssrs 2008 textbox expression value Expand / Collapse
Author
Message
Posted Wednesday, April 30, 2014 10:30 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 9:00 PM
Points: 374, Visits: 440
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?
Post #1566495
Posted Wednesday, April 30, 2014 10:39 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, September 11, 2014 6:27 AM
Points: 333, Visits: 742
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.
Post #1566499
Posted Wednesday, April 30, 2014 1:23 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 9:00 PM
Points: 374, Visits: 440
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.
Post #1566580
Posted Thursday, May 1, 2014 6:03 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, September 4, 2014 3:11 PM
Points: 760, Visits: 2,206
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.




The opinions expressed herein are strictly personal and do not necessarily reflect the views or policies of my employer.
Post #1566680
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse