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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Last running total in report = 0

Status
Not open for further replies.

OCPCLC

Technical User
Jan 31, 2001
8
US
Hi there,

I am using Crystal Reports 7.0. I have created a bunch of running total formulas to calculate the race and sex information on an applicant report for my employer. The problem is that the last total in the report equals zero even though there is one applicant in that group. All of the other running totals work. Is there a trick I could try with On LastRecord? Any help is sincerely appreciated!
 
Yes, emallon , it is in a group footer.
 
kenhamady,

Do you mean my Running Total Condition formula? It is:

Next({tblTemp.ResumeKey}) <> {tblTemp.ResumeKey}

tblTemp.ResumeKey is the unique identifier for each applicant record. I was attempting to write a formula that would start something like this:

If Not OnLastRecord then
Next({tblTemp.ResumeKey}) <> {tblTemp.ResumeKey}
else If OnLastRecord then...

But that's as far as I got because I couldn't figure out what else to put. I apologize if that is not what you meant, this is my first time posting a question!

 
Is your formula being used at the &quot;Evaluate&quot; or &quot;Reset&quot; level?

What are your settings for the running total at the &quot;Evaluate&quot; and &quot;Reset&quot; levels?
each record?
on change of field?
on change of group?
use of formula?

 
emallon,

For Evaluate I am using Use a formula and the formulas I am using are the ones I've provided above. (FYI, I have many duplicate records and that's why the Next()<> formula.) Reset is set to On Change of group. Maybe I should Use a formula on Reset, like Not OnLastRecord. But how would I get it to Reset on the change of group too? Is there a formula for that?
 
No, You should skip the formula and evaluate on change of field. That way you will only pick up once per field. If you have grouped on this field you can also do once per group.

BTW the formula would have been:

OnLastRecord or
Next({tblTemp.ResumeKey}) <> {tblTemp.ResumeKey}

Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Ken,

I tried it on change of field and it messed up the other running totals in the report. Any other ideas? Thanks for the formula!
 
It shouldn't have any affect on the other running totals, unless they rely, somehow, on this one.

If using the formula solves the problem, use that instead. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
It doesn't. :eek:( Is there a formula that I could use under Reset that would reset on the change of the appropriate group AND Not OnLastRecord? Am I grasping at straws?
 
Ken,

Whoops, didn't know you meant on Evaluate. That did it!!!! You are truly a Crystal guru -- I am forever in your debt! I am doing the dance of joy in your honor. THANK YOU!!!!!!!!!!!!!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top