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

Sum Field when Expression

2 Answers 1010 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Islam
Top achievements
Rank 2
Islam asked on 06 Mar 2016, 01:54 AM

Hello,

i have a field returning Boolean Value (True/False), and i want to Sum another field Named (Total) in the footer section when my Boolean Value return TRUE for each record in the detailed section  

Thanks.

2 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 09 Mar 2016, 11:55 AM
Hello Islam,

You need to sum the Total field conditionally. For this purpose you can use the IIf() conditional function:

= Sum(IIf(Fields.BooleanField = True, Fields.Total, Null))

Regards,
Nasko
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Rod
Top achievements
Rank 1
answered on 05 Jun 2019, 01:39 PM
Thank you! I don't know why I did not think of this myself. It would be a great example in the docs because I have run into this situation before. I need to bookmark this one.
Tags
Report Designer (standalone)
Asked by
Islam
Top achievements
Rank 2
Answers by
Nasko
Telerik team
Rod
Top achievements
Rank 1
Share this question
or