Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Summarize $ based on the Max Date Parameter Post Reply Post New Topic
Author Message
MAUser
Newbie
Newbie


Joined: 12 Jan 2011
Online Status: Offline
Posts: 3
Quote MAUser Replybullet Topic: Summarize $ based on the Max Date Parameter
     Posted: 12 Jan 2011 at 9:41am

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

IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum