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
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Total field outside of scope

Author  Topic 

tech2
Yak Posting Veteran

51 Posts

Posted - 2013-03-29 : 11:28:19
SSRS Report Builder 3.0 2008 R2

I'm getting the message below when I try to total my 'ExtendedOverCurrentMax' field.

The Value expression for the textrun ‘Textbox2.Paragraphs[0].TextRuns[0]’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.

=Sum(Fields!ExtendedOverCurrentMax.Value,InventoryTurnover)

'InventoryTurnover' is my dataset and 'Tablix4' is my date region.

Thanks,

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-03-29 : 13:43:30
try

=Sum(Fields!ExtendedOverCurrentMax.Value,"InventoryTurnover")

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

tech2
Yak Posting Veteran

51 Posts

Posted - 2013-03-29 : 15:33:58
Thanks for the response. Below is the ERROR, when I tryed your expression.

The Value expression for the text box ‘Textbox2’ refers to the field ‘ExtendedOverCurrentMax’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case.

quote:
Originally posted by visakh16

try

=Sum(Fields!ExtendedOverCurrentMax.Value,"InventoryTurnover")

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/



Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-03-30 : 01:56:37
is ExtendedOverCurrentMax within dataset which is bound to your table where you used the expression?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

tech2
Yak Posting Veteran

51 Posts

Posted - 2013-03-30 : 10:29:45
No, I inserted a colunm to the right of my table. All the extended totals are calculating across but I'm trying to get the Grand Total at the bottom.

Thanks,

quote:
Originally posted by visakh16

is ExtendedOverCurrentMax within dataset which is bound to your table where you used the expression?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/



Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-03-30 : 13:07:55
you didnt answer my question. Is ExtendedOverCurrentMax field returned by dataset?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

tech2
Yak Posting Veteran

51 Posts

Posted - 2013-04-01 : 08:44:28
I thought I did answer your question. I created a calclated field by adding a field to the right of my table. Do you call that Bound? I'm new to Report Builder.


quote:
Originally posted by visakh16

you didnt answer my question. Is ExtendedOverCurrentMax field returned by dataset?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/



Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-01 : 09:58:31
I created a calclated field by adding a field to the right of my table
You mean in dataset or adding a column and using expression in report area?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

tech2
Yak Posting Veteran

51 Posts

Posted - 2013-04-03 : 11:08:59
I added the calculated field in the 'Report Area'

I'm just extending the cost times the qty. across by location and trying to get a total at the bottom.

Thanks for your patience

quote:
Originally posted by visakh16

I created a calclated field by adding a field to the right of my table
You mean in dataset or adding a column and using expression in report area?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-03 : 13:56:21
ok...can you try this instead

=Sum(Fields!ExtendedOverCurrentMax.Value,"Tablix4")

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

tech2
Yak Posting Veteran

51 Posts

Posted - 2013-04-05 : 12:37:06
Thanks for the coninued support. Below is the ERROR message. when using =Sum(Fields!ExtendedOverCurrentMax.Value,"Tablix4")

The Value expression for the text box ‘Textbox2’ refers to the field ‘ExtendedOverCurrentMax’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case.

Thanks,

quote:
Originally posted by visakh16

ok...can you try this instead

=Sum(Fields!ExtendedOverCurrentMax.Value,"Tablix4")

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-09 : 01:15:39
then i'm sure the field itself is not present in the dataset you created

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -