news.codecharge.com
|
| Posted: 07/30/2001, 8:46 PM |
|
Hi all,
Have a table that collects information on money spent from a client
allowance. i would like to display the information with a running total at
the end of each record.
e.g.
clientname amountspent totalallowance amountremaining
fred $200.00 $2000.00 $1800.00
the fields clientname,amountspent and totalallowance are fields in the DB.
How to do the calculation and display for amount rtemaining is my challenge.
Can someone help or advise?
Thank in Advance
markus
|
|
|
 |
Tony Tomov
|
| Posted: 07/31/2001, 12:46 AM |
|
Markus,
The one method is:
1. define in the form a new virtual field - the total remaining field.
2. Open the even tab in the form properties and choice a Before Show Event
In the even write (for PHP):
$fldField1 = $fldtotalalfieldname-$fldamountfieldname;
That is
Regards
Tony Tomov
"news.codecharge.com" wrote:
> Hi all,
>
> Have a table that collects information on money spent from a client
> allowance. i would like to display the information with a running total at
> the end of each record.
>
> e.g.
>
> clientname amountspent totalallowance amountremaining
> fred $200.00 $2000.00 $1800.00
>
> the fields clientname,amountspent and totalallowance are fields in the DB.
> How to do the calculation and display for amount rtemaining is my challenge.
>
> Can someone help or advise?
>
> Thank in Advance
>
> markus
|
|
|
 |
Markus
|
| Posted: 07/31/2001, 5:52 PM |
|
Tony,
Thanks for the suggestion, this wouldn't show the correct amount remaining
though for the next record would it? I would need to pass the total remainng
value to somewhere to be used on the next calculation?
thanks
markus
On Tue, 31 Jul 2001 17:49:03 +1000, Tony Tomov wrote
(in message <3B6662EE.71301AE3@abs.bg>):
> Markus,
>
> The one method is:
> 1. define in the form a new virtual field - the total remaining field.
> 2. Open the even tab in the form properties and choice a Before Show Event
> In the even write (for PHP):
> $fldField1 = $fldtotalalfieldname-$fldamountfieldname;
>
> That is
>
> Regards
> Tony Tomov
==============================================================
Posted with Hogwasher. For a free Test Drive click on:
http://www.asar.com/cgi-bin/product.pl?58/hogwasher.html
==============================================================
|
|
|
 |
Tony Tomov
|
| Posted: 08/01/2001, 12:55 AM |
|
Second Try
Create a virtual filed.
In the field properties of the virtual filed go to a Default value box and write
For PHP this can be
=$fldamountname-$fldpricename
Do not forgot that the = must be the first charcter
Regards
Tony Tomov
Markus wrote:
> Tony,
>
> Thanks for the suggestion, this wouldn't show the correct amount remaining
> though for the next record would it? I would need to pass the total remainng
> value to somewhere to be used on the next calculation?
>
> thanks
>
> markus
>
> On Tue, 31 Jul 2001 17:49:03 +1000, Tony Tomov wrote
> (in message <3B6662EE.71301AE3@abs.bg>):
>
> > Markus,
> >
> > The one method is:
> > 1. define in the form a new virtual field - the total remaining field.
> > 2. Open the even tab in the form properties and choice a Before Show Event
> > In the even write (for PHP):
> > $fldField1 = $fldtotalalfieldname-$fldamountfieldname;
> >
> > That is
> >
> > Regards
> > Tony Tomov
>
> ==============================================================
> Posted with Hogwasher. For a free Test Drive click on:
> http://www.asar.com/cgi-bin/product.pl?58/hogwasher.html
> ==============================================================
|
|
|
 |
Markus
|
| Posted: 08/01/2001, 4:01 PM |
|
thanks, I'll give it a try.
markus
On Wed, 1 Aug 2001 17:58:12 +1000, Tony Tomov wrote
(in message <3B67B694.EE921D14@abs.bg>):
> Second Try
> Create a virtual filed.
> In the field properties of the virtual filed go to a Default value box and
> write
>
> For PHP this can be
> =$fldamountname-$fldpricename
>
> Do not forgot that the = must be the first charcter
>
> Regards
> Tony Tomov
--
You never know where you're going 'till you get there...
==============================================================
Posted with Hogwasher. Mac first, Mac only:
http://www.asar.com/cgi-bin/product.pl?58/hogwasher.html
==============================================================
|
|
|
 |
Nadeem Malik
|
| Posted: 08/04/2001, 2:39 AM |
|
What about if someone using ASP?
Nadeem
"Tony Tomov" <ttomov@abs.bg> wrote in message
news:3B6662EE.71301AE3@abs.bg...
> Markus,
>
> The one method is:
> 1. define in the form a new virtual field - the total remaining field.
> 2. Open the even tab in the form properties and choice a Before Show Event
> In the even write (for PHP):
> $fldField1 = $fldtotalalfieldname-$fldamountfieldname;
>
> That is
>
> Regards
> Tony Tomov
>
> "news.codecharge.com" wrote:
>
> > Hi all,
> >
> > Have a table that collects information on money spent from a client
> > allowance. i would like to display the information with a running total
at
> > the end of each record.
> >
> > e.g.
> >
> > clientname amountspent totalallowance amountremaining
> > fred $200.00 $2000.00 $1800.00
> >
> > the fields clientname,amountspent and totalallowance are fields in the
DB.
> > How to do the calculation and display for amount rtemaining is my
challenge.
> >
> > Can someone help or advise?
> >
> > Thank in Advance
> >
> > markus
>
|
|
|
 |
batman
|
| Posted: 08/04/2001, 3:22 AM |
|
wouldn't it be possible with a SQL statement ?
|
|
|
 |
|