Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 ssrs 2008 textbox expression value

Author  Topic 

scamper
Yak Posting Veteran

52 Posts

Posted - 2014-04-30 : 12:28:19
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?

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-04-30 : 14:10:14
You should convert the number to a string and then concatenate. e.g.

="Checking: $" & Cstr(
IIF(Fields!PaymentType.Value="Checking", sum(cdec(Fields!TransactionAmount.Value)),0)
)
Go to Top of Page

scamper
Yak Posting Veteran

52 Posts

Posted - 2014-04-30 : 18:04:23
quote:
Originally posted by James K

You should convert the number to a string and then concatenate. e.g.

="Checking: $" & Cstr(
IIF(Fields!PaymentType.Value="Checking", sum(cdec(Fields!TransactionAmount.Value)),0)
)




This worked fine! Thanks!
Go to Top of Page
   

- Advertisement -