This is a migrated thread and some comments may be shown as answers.

Calculating sum of a Textbox

1 Answer 264 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ismail
Top achievements
Rank 1
Ismail asked on 08 Jul 2014, 09:02 AM
Hi

I currently have a textbox that calculates the total of two fields
textbox1 =(Fields.qty * Fields.cost)

i want to add a textbox at the end of the group to calculate the sum of textbox1
I have tried

textbox2 = Sum(Textbox1) but i am getting the following error
"An error has occured whil processing 'report1'. the expression contains object 'textbox1'that is not defined in the current context"

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 10 Jul 2014, 11:33 AM
Hello Ismail,

Values of report items cannot be retrieved inside an expression. The correct approach is to calculate the sum in textBox2 using the data source fields directly:

= Sum(Fields.qty * Fields.cost)

For more information on the topic, please refer to the Expressions help articles.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Ismail
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or