Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calcualted/Formual Fileds in SSRS

Status
Not open for further replies.

beebass

MIS
Feb 19, 2007
14
DE
Hi there.

I'm currently using Microsoft Visual Studio 2005 to design reports that were previously done through crystal. I'm having difficulty recreating a formula field based on the If condition. The following is a shortened version of what I have used in Crystal:

if {Table.Product} = "X-RECO-S-30,000IUPFS" THEN 30000 ELSE
IF {Table.Product} = "X-RECO-C-20,000IU" THEN 20000 ELSE
"Not Applicable"

this is how I've translated it in Reporting Services

=IIf(Fields!Product.Value="X-RECO-S-30,000IUPFS",30000, IIf(Fields!Product.Value="X-RECO-C-20,000IU",20000,"Not Applicable"))

This field always returns Not Applicable regardless of what is in the Product field. Any ideas why?

Thanks



 
Any trailing spaces on the field you are referencing ?

Also depends on how you are trying to apply the formula - is it in a table with all entries or in a textbox ?

Other than that, your syntax etc is fine - can;t see an issue with the formula itself...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top