I have a Report that uses a parameter for a Date range.
The report brings all the completed activity for the date.
I have a field that also shows me what the sales that person made during the time the activity was completed and the max of the date range. The problem is that I can add the sales up in the detail section, but am having a problem getting it to work in the Group.
Since the Max(Date) is calculated based on the end result, I cannot simply sum the total of the fields.
I thought I would be able to get around this with a NumberVar but had no luck.
Here is the formula I am using in the detail section:
WhilePrintingRecords;
shared NumberVar SSTotal;
SSTotal:= if
{@Date} in Date (year({ActivityTable.COMPLETEDDATE}),month({ActivityTable.COMPLETEDDATE}),1) to Maximum ({ActivityTable.COMPLETEDDATE})
then SSTotal + {Sales.PURCHASES};
@Date Formula:
if isdate({@Date Convert}) then cdate({@Date Convert});
@Date Convert Formula:
{Sales.MONTH}+"/"+'01'+"/"+{Sales.YEAR}
Any Help would be greatly appreciated
Thanks