Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


assign an expression to a variable !!


assign an expression to a variable !!

Author
Message
salmita
salmita
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 Visits: 72
Hi,

I'm working with Report Builder, I should do a sum of many values from different columns (this clumns are from a list in sharepoint )

This is my expressio which does the sum :
=(Lookup(Fields!Ele_Crs_Har_Q1_Ans.Value,Fields!Answer.Value,Fields!Value.Value,"Coefficient"))+(Lookup(Fields!Ele_Crs_Har_Q2_Ans.Value,Fields!Answer.Value,Fields!Value.Value,"Coefficient"))+(Lookup(Fields!Ele_Crs_Har_Q3_Ans.Value,Fields!Answer.Value,Fields!Value.Value,"Coefficient"))+(Lookup(Fields!Ele_Crs_Har_Q4_Ans.Value,Fields!Answer.Value,Fields!Value.Value,"Coefficient"))+(Lookup(Fields!Ele_Crs_Har_Q5_Ans.Value,Fields!Answer.Value,Fields!Value.Value,"Coefficient"))+(Lookup(Fields!Ele_Crs_Har_Q6_Ans.Value,Fields!Answer.Value,Fields!Value.Value,"Coefficient"))

My problem is with this Expression, it wroks but i wanna assign it to a variable !!! i get an error :

When the report contains multiple datasets, field references outside of a data region must be contained within aggregate functions which specify a dataset scope.


I think because i use the lookup !! but i don't know how do i resolve this ?

Any idea Plz ?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search