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

Integer arithmetic in a group summary row

4 Answers 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 08 Aug 2010, 07:06 AM
I have a group summary item that has the following expression:

= (Sum(Fields.ActualAttendance) / Fields.DaysTaught)

Actual attendance and DaysTaught are integers.  i would like to display the result with single precision decimal.  How can I do this in an expression?  The problem is that the integer arithmetic is returning a tuncated integer so using the format option always display .0
What I need is to cast the integers to decimals beforehand.

Thanks

4 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 10 Aug 2010, 09:22 AM
Hi Jonathan,

You can use the built-in CDbl function for this purpose. More information about the available functions and their purpose is available in the Functions help article.

Sincerely yours,
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
Jonathan
Top achievements
Rank 1
answered on 10 Aug 2010, 04:15 PM
Thanks,

I ended up changing the underlying busines  object so that all the columns were decimals instead of integers which worked but was probably not the most efficient.

0
Melinda
Top achievements
Rank 1
answered on 22 Oct 2010, 07:57 PM
Where is the expression placed for the cell to be populated? I see nothing in the collection editor.
0
Steve
Telerik team
answered on 25 Oct 2010, 02:14 PM
Hello Melinda,

We're not sure we understand your question. Check the Using Expressions help section for more info where expressions can be used and let us know if you have specific question.

Sincerely yours,
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
Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Steve
Telerik team
Jonathan
Top achievements
Rank 1
Melinda
Top achievements
Rank 1
Share this question
or