When previewing a report I get the following error:
Unable to cast object of type 'SqldataObject' to type 'Telerik.Reporting.Processing.Expressions.IHierarchicalData'
I have narrowed down the problem to a textbox that has
=Sum(Exec("group4",Fields.Amount1))
Any help is appreciated
Unable to cast object of type 'SqldataObject' to type 'Telerik.Reporting.Processing.Expressions.IHierarchicalData'
I have narrowed down the problem to a textbox that has
=Sum(Exec("group4",Fields.Amount1))
Any help is appreciated
4 Answers, 1 is accepted
0
Andrew
Top achievements
Rank 1
answered on 19 Apr 2011, 07:24 PM
I have narrowed it down. It is an invalid scope exception. This is something I run into quite often. The only thing I've been able to successfully use as a scope is a whole report. Looking at the documentation on scope wasn't much help as to any special syntax to using a group as a scope other than indicating it can be done. Is there an example I can look at to further help me?
0
Hi Andrew,
As duly noted in the description of the Exec function in the Functions help article, Exec is used mostly with aggregate expressions as a second parameter. So your correct expression should be:
Kind regards,
Steve
the Telerik team
As duly noted in the description of the Exec function in the Functions help article, Exec is used mostly with aggregate expressions as a second parameter. So your correct expression should be:
= Exec("group4", Sum(Fields.Amount1))
Kind regards,
Steve
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Andrew
Top achievements
Rank 1
answered on 26 Apr 2011, 06:35 PM
Thank you Steve, however my invalid scope exception still remains. I have looked in the group explorer to verify the name of my group. My current expression is:
= Exec("group3", Sum(Fields.Amount1))
To confirm the name further, I looked in the TabComFA.Designer.cs and saw the line:
this.group3.Name = "group3";
The expression, or rather the textbox with the expression, is contained in the report footer.
= Exec("group3", Sum(Fields.Amount1))
To confirm the name further, I looked in the TabComFA.Designer.cs and saw the line:
this.group3.Name = "group3";
The expression, or rather the textbox with the expression, is contained in the report footer.
0
Hi Andrew,
This is expected. A named scope can be the name of a data item, or a group. You must specify the current scope or a containing scope; you cannot specify a scope that is lower or at the same level in containment order than the current scope. More information is available in the Expression scope help article.
Kind regards,
Steve
the Telerik team
This is expected. A named scope can be the name of a data item, or a group. You must specify the current scope or a containing scope; you cannot specify a scope that is lower or at the same level in containment order than the current scope. More information is available in the Expression scope help article.
Kind regards,
Steve
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items