SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


ssrs 2008 textbox expression value


ssrs 2008 textbox expression value

Author
Message
wendy elizabeth
wendy elizabeth
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1631 Visits: 783
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?
gbritton1
gbritton1
SSC Eights!
SSC Eights! (821 reputation)SSC Eights! (821 reputation)SSC Eights! (821 reputation)SSC Eights! (821 reputation)SSC Eights! (821 reputation)SSC Eights! (821 reputation)SSC Eights! (821 reputation)SSC Eights! (821 reputation)

Group: General Forum Members
Points: 821 Visits: 874
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.
wendy elizabeth
wendy elizabeth
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1631 Visits: 783
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.
LightVader
LightVader
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1013 Visits: 3002
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search