Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sum and Average Group Wage instead of Details Wage

I have a subreport where I have included all of our employment records and grouped it by employee ID. In the Group Footer, to show the latest employment record I used the Max(Start Date) and I have also placed the Hourly Wage field here which shows the appropriate Wage for the Max Date. But I can't seem to use the Sum or Average Summary because it Sums and Averages All Wages in the Details report vs. only the latest record.

So, how do I Sum/Average the wages for only the last employment record Or how do I create the report to show only the Last Employment Record?

I'm using Crystal XI. Any help will be greatly appreciated.

Thanks

replied

Place the fields in group header instead of placing in details section using maximum() function. Now got to report>record sort expert>add start date field-->select descending order.

Now the report shows latest date entries for each group.

If you want to calcualte the sum then use mannual running totals like

create a formula like

@sum:

whileprintingrecords;
numbervar i;
i:=i+{field}

Now place this in group header and supress

create another formula like

@Total:

whileprintingrecords;
numbervar i;

place this in report footer which gives grand total.

Regards,

Raghavendra

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question