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

Formula confusion

Status
Not open for further replies.

jnujella

Programmer
Feb 15, 2007
15
US
HI all,

I had a situation where I have use the manual running total
so i create 3 formulas like

1) to initiliaze the variable
whileprintingrecords;
numbervar cnt;
cnt := 0;

2) To increment the variable
whileprintingrecords;
numbervar cnt := cnt + 1;

3) To show the variable
whileprintingrecords;
numbervar cnt;

and then I place the first formula in report header
second formula in details section a
second fornula again in detais section b
third formula in report footer.

now what i expect is like this
RH 0
DA 1
DB 2
RF 2

HOWEVER i get values like this

RH 0
DA 1
DB 1
RF 1

Thanks in advance.

 
Detail_a and Detail_b are referencing the same record, therefore the count is one. You could change the formula to:
whileprintingrecords;
numbervar cnt;
cnt := cnt + 2;

...assuming you are always counting both sections.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top