Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

assign an expression to a variable !! Expand / Collapse
Author
Message
Posted Tuesday, March 5, 2013 7:13 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, July 10, 2013 3:36 AM
Points: 16, Visits: 41
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 ?
Post #1426815
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse