Forums

This topic is locked

Calculations

Posted 24 Feb 2001 18:40:38
1
has voted
24 Feb 2001 18:40:38 Johan Van Dyk posted:
My problem is a s follows.

I have a table which consists of 3 rows.
Row 1 contains the field names.
Row 2 contains a record set which is repeated.
In row 3 I want to do a caculation on a field which contains numbers which is in the repeated section(row 2)

I have tried the (Total (Table Formulas).mxp) extention but it does not seem to work - it give me error messages when applying it. <img src=icon_smile_sad.gif border=0 align=middle>

Your quick responses will be highly appreciated. <img src=icon_smile_big.gif border=0 align=middle>

Johan Van Dyk

Replies

Replied 26 Feb 2001 20:29:18
26 Feb 2001 20:29:18 Waldo Smeets replied:
Johan,

you should do this by hand. Before the Repeat Region you need to declare a variable and set it's value to zero.

&lt;%
DIM myTotal
myTotal = 0
%&gt;

And then IN the Repeat Region you should write the following code:

&lt;% myTotal = myTotal + rsName.Item.Fields(myField).Value %&gt;

And then in the table cell where you want to place the total

&lt;% =myTotal %&gt;

That should do the job.

Waldo Smeets - www.UDzone.com Webmaster
------------------------------------------
www.UDzone.com : A Dreamweaver, Ultradev and Fireworks recourse site for developers
by developers.
------------------------------------------
Replied 27 Feb 2001 06:32:10
27 Feb 2001 06:32:10 Johan Van Dyk replied:
Thanks a million Waldo

This is exactely what I was looking for, works like a dream.

Regards

Johan Van Dyk

Reply to this topic