Search code examples
c#xtrareport

how to calculate conditional sum in devexpress xtrareport


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.


Solution

  • I found its solution by adding a calcultedfield and assigning

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

    in expression editor.