How to SUM

I had created a HR Headcount report in Crystal report with below two fields.
count(Domestic Emp ID) and count(International EMP ID) both are created with formula in Report level.
Now I want add these two counts to make Grand Total, But Crystal report is not supporting
Grand Total= (count(Domestic Emp ID) + count(International EMP ID)),
Any idea how can I added these two and show to Detail report?

My concerns is why Crystal report is not supporting Function over Function. I meant if we created any field with function like count, or sum, you can not add another function on it.
Example: sum(count(country Emp Id)…
Any suggestions…


Philip (BOB member since 2006-03-02)

I think you may have a different problem that what is mentioned.

Both of the formulas using Count() are grand total type formulas. Both will give you the number for the rows of data in your report. While you cannot use the Sum() function on these, you can still add them together as in your first formula: Count() + Count(). However, this will just give you a number that is double the rows of data that you have in the report.

I am assuming that if an employee is domestic, they will have a Domestic Employee ID and the International field will be left blank. You could create a detail-level formula for each that checks if they are empty or not and assign a 0 or 1 respectively. Then you can sum the fields and add the two sums together like Sum() + Sum().


JBray :us: (BOB member since 2008-07-15)