Search code examples
crystal-reportsjasper-reports

How SUM() function works in Crystal report?


I am developing jasper reports for available crystal reports. In crystal report I found some variable for which expression are given as below:

   Variable                          Expresion
  region_amt      Sum ({Command.CEILING_AMT},{Command.PARENT_REF_DATA_CODE} );
  reg_amt2        Sum ({@Annual Allocated Dollars},{Command.PARENT_REF_DATA_CODE});

For first var, datatype of ceiling_amount is number while PARENT_REF_DATA_CODE is of String type. Same case is with reg_amt2 variable.

So I am getting confused weather SUM is concatenation or arithmetic SUM operation?

Can someone please clarify on this? Also fields in detail band are grouped by PARENT_REF_DATA_CODE.


Solution

  • Here as you said report is group by PARENT_REF_DATA_CODE.

    Sum here means output of the formula is summing the values with respect to the group PARENT_REF_DATA_CODE.

    Let me know if you need further information