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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using expressions in other expressions SQL 2000

Status
Not open for further replies.
Jul 19, 2003
132
NZ
All the other reporting tools i've used have the ability to give the result of an expression (formula or calculation) a name (or load it into a variable) and include it in another expression (formula or calculation). I can't find this functionality anywhere in SSRS 2000, does it exist?

Thanks.
 
Do uou mean like this:
=Left(Trim(Fields!Foo.value), 2)
 
I don't think so.

I mean creating an expression called say "CountFailures" that is something like "=IIF(Fieldname>0,1,0)" then creating another expression in a higher group that is something like "=IIF(CountFailures>1,"Fail","Pass).

So I'm referring to a previously calculated expression in the second expression. Easy to do in other reporting tools.

Bruce
 
What if you added a new field named "Failure" defined as [tt]=IIF(Fieldname>0,1,0)[/tt]

Then when in a group you could do [tt]=IIF(Count(Failure)>1,"Fail","Pass")[/tt]

I mean adding a user-defined field to the dataset in your report not changing your SQL to return an extra field... although I suppose that would also work.
 
Actually that field would be [tt]=IIF(Fields!Fieldname.Value>0,1,0)
[/tt]

but you get the idea..
 
Thanks!

I didn't realise there was the ability to add a calculatede field to the dataset, it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top