GreatPlainsMan
Technical User
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
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