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

Variable Counter used in Summary formula not working

Status
Not open for further replies.

GreatPlainsMan

Technical User
Sep 15, 2004
2
US
I am tryng to create summary of a field based on a varaible that is counter.

I.e. Patient 1 has 10 records in the table corresponding to the number of visits. For Visits 1-3, 4-7, 8-10 their charges will be in different buckets (formulsa). So I setup a variable as a counter to get the visit number. Then I have formulas for the three aging periods. So for the dtail everything is fine. It is when I try to sum for the patient that I can't get any totals.

Group Header:
//@vardeclarations
WhilePrintingRecords;
global numbervar ptcounter:=0;
global numbervar paid1:=0

Detail:
//@runningcounter
WhilePrintingRecords;
global numbervar ptcounter:=ptcounter+1

//@aging1
WhilePrintingRecords;
numbervar ptcounter;
if ptcounter in 1 to 3 then
{PatientCountAGING2;1.charge}

//@patientaging1
WhilePrintingRecords;
numbervar ptcounter;
numbervar paid1;
EvaluateAfter ({@aging1});
EvaluateAfter ({@runningcounter});
if ptcounter in 1 to 3 then
paid1:= paid1+ CDbl ({@aging1})

Group Footer:
WhileReadingRecords;
numbervar paid1;
paid1

Any thoughts?

This is my first post here. Thank you

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top