Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Total Crystal Reports Formula

Status
Not open for further replies.

angel7170

Programmer
Mar 12, 2009
15
0
0
US

Hello,

I am stuck in the formula mentioned below. I have "Resolved" and "Touched" formulas doing a running total. What I need to do is to combine both in one formula and do a count. Also, field
{HPD_HELP_DESK.INCIDENT_NUMBER} should not be counted twice (like one in Resolved and one in Touched).

Please assist.








WhilePrintingRecords;
Global NumberVar Total;
//Resolved
if {@Resolved Date} in {?Start Date} to {?End Date} then
(
if {HPD_HELP_DESK.LAST_RESOLVED_BY} = GroupName ({@Analyst}) then
if {HPD_HELP_DESK.INCIDENT_NUMBER} <> next ({HPD_HELP_DESK.INCIDENT_NUMBER}) then
(
Total := Total + 1;
Total
)

)
else

//Touched
if {@Touched Date} in {?Start Date} to {?End Date} then

if {@Touched}like {@Analyst} and
not(next({@Touched}) like {@Analyst}) and
({HPD_HELP_DESK.INCIDENT_NUMBER} = next({HPD_HELP_DESK.INCIDENT_NUMBER}))
or
({@Touched}like {@Analyst} and
({HPD_HELP_DESK.INCIDENT_NUMBER} <> next ({HPD_HELP_DESK.INCIDENT_NUMBER})))
then

(
Total := Total + 1;
Total
)
 
What version of Crystal? You should never ask a question without this information.

Is there some reason you are trying to do this with a formula as opposed to using a running total field with a specific evaluation logic?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Sorry! Crystal Reports XI is the version I am using.

I had to compare the next field of ({HPD_HELP_DESK.INCIDENT_NUMBER} and {@Analyst} to make sure that there is no duplicate count. so I am using NEXT function in the formula.

please let me know if there is an easier way to do .. Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top