Groups | Blog | Home
all groups > sql server reporting services > june 2007 >

sql server reporting services : Grabbing a calculated field for a new calculation



peashoe
6/6/2007 8:38:02 AM
I'm going to try and explain this as best as I can :)

I have calculated fields that has the following expressions - I've
named each textbox hoping that I could grab them in the expression but
I have no idea how??:

1. totalMarket: =iif(sum(Fields!Wins.Value) = 0, 0, sum( Fields!
Wins.Value) + iif(sum(Fields!Pending.Value) = 0, 0, sum(Fields!
Pending.Value))) - iif(sum(Fields!Losses.Value) = 0, 0, sum(Fields!
Losses.Value))

2. remainingSales = =iif(Sum(Fields!Pending.Value)=0, 0, Sum(Fields!
Pending.Value))

I need the next text box (marketPercent) to do the following...

totalMarket - remainingSales / totalMarket

I used all the expression above to make it work - but there has to be
an easier way.. I tried using..
=iif(Sum(ReportItem!totalMarket.Value)) ... etc but that syntax did
not work.... does anyone know how to grab the name of the textbox in
an expression?

ps - this is not a header or a footer - it's in the actual form

Thanks in advance!
Lisa
EMartinez
6/7/2007 2:20:10 AM
[quoted text, click to view]


As far as I know, referencing the textbox control by an alias is not
possible. Referencing the textbox by the expression used is most
likely the only way to reference it. Sorry that I could not be of
greater assistance.

Regards,

Enrique Martinez
Sr. Software Consultant
AddThis Social Bookmark Button