SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 ssrs 2008 textbox expression value
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

scamper
Yak Posting Veteran

52 Posts

Posted - 04/30/2014 :  12:28:19  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3704 Posts

Posted - 04/30/2014 :  14:10:14  Show Profile  Reply with Quote
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 - 04/30/2014 :  18:04:23  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000