>I have a table with persons and their payroll sums. For example,
>lets assume that all persons sums are same values:
>
>Person Salary
>------------------
>Edward 1.4
>Edward 1.4
>Michael 1.4
>Michael 1.4
>Paul 1.4
>Paul 1.4
>
>
>I want to design a report in FoxPro For Windows to show each person
>salary so that subtotal of Salary field is rounded to whole integer for
>each person.
>Most important, in summary band I want to show sum of those rounded subtotals.
>
>So this report has a data group with group expression "Person" and summary band.
>Output of this report must look as following:
>
>Person Salary
>-----------------
>Edward 3
>Michael 3
>Paul 3
>------------
>Total 9
>
>I'm capable to round each person salary: I add a report variable
>
>salsum:
>
>Calculate Sum
>Reset at Person
>Value to store Salary
>
>and in report Person group footer I had and report field with
>
>Expression round( m.salsum, 0 )
>Calculate nothing
>
>However, it is not possible to sum those subtotals in to summary band !!
>
>For summary band, if I sum without rounding and round the whole sum, it produces
>
>round( 6 * 1.4, 0 ) = 8
>
>If I round all individual records before summing, it produces
>
>6 * 1 = 6
>
>However, the correct result is 9. Is it possible to get this result?
>This seems to be serious limitation making report writer useless.
>
>It possible to sum rounded subtotals using FPW report writer ?
Hi Andrus,
Have you tried using the CEILING function. I haven't tried this in a report, but in the command window CEILING(1.4 * 6) = 9, which is the result you're looking for.
hth,
George
Ubi caritas et amor, deus ibi est