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
 Development Tools
 Reporting Services Development
 SQL Reporting Srvcs - Help with a calculated field

Author  Topic 

JeffS23
Posting Yak Master

212 Posts

Posted - 2009-11-04 : 11:53:14
My company recently decided to transition from Crystal reports over to SSRS. Needless to say, I am scrambling to catch up to speed.

I need some assistance with creating a calculated field. In my Crystal report, I created the following formula and then in turn grouped on it:

If {aaUDS7;1.ObsValue} > "1" and {aaUDS7;1.ObsValue} < "7" then "1. < 7" Else
IF {aaUDS7;1.ObsValue} >= "7" and {aaUDS7;1.ObsValue} <= "9" then "2. 7 to 9" else
IF {aaUDS7;1.ObsValue} > "9" THEN "3. > 9" ELSE "3. > 9"

I need to mimic this in SSRS and not sure how to handle it correct.

I tried to set up my calculated field like this:


= If Fields!ObsValue.Value > "1" and Fields!ObsValue.Value < "7" then "1. < 7" Else
IF Fields!ObsValue.Value >= "7" and Fields!ObsValue.Value <= "9" then "2. 7 to 9" else
IF Fields!ObsValue.Value > "9" THEN "3. > 9" ELSE "3. > 9"


but its telling me I have an "Unrecognized identifier" and underlines the first If in red. Any insight or help is deeply appreciated.

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-11-04 : 13:32:53
If in SSRS is Iif (2 I's)

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

JeffS23
Posting Yak Master

212 Posts

Posted - 2009-11-04 : 14:56:48
Thanks!
Go to Top of Page
   

- Advertisement -