how to calculate conditional sum in devexpress xtrareport

kashif picture kashif · Oct 14, 2012 · Viewed 18.1k times · Source

Consider my following XtraReport

enter image description here

It generates following output when previewed.

enter image description here

Notice the sum of Total marks in the report footer i.e 125. My Question is: How will I calculate the sum of the only fields where result is p. Thus in this case sum of TotalMarks should be 75.

Answer

kashif picture kashif · Oct 24, 2012

I found its solution by adding a calcultedfield and assigning

Iif([Result]='P',[TotalMarks],0 )

in expression editor.