Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Joachim Bieler Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Calculate a total in bBrowser3 for a VirtualFieldColumn Date: Wed, 24 Aug 2011 08:04:08 +0200 Lines: 24 Message-ID: <9bjiieFdofU1@mid.individual.net> References: <7dfe0be5-0fde-4c84-8a61-93a7ed442bb3@l8g2000prd.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net DKm4lH+TIg42ezEBtdpBiAVb+rgxJpeJ/g0oRbRNMY0tneqLL1 Cancel-Lock: sha1:2iG9n0aWKcjbq5LqjFvVSOJ0tP8= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: <7dfe0be5-0fde-4c84-8a61-93a7ed442bb3@l8g2000prd.googlegroups.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.clipper.visual-objects:1872 Grant, you can determine the values of the virtual field column with the access bVirtualFieldColumn:DataList. See topic 'bVirtualFieldColumn:DataList' in the bBrowser help for more information. With the following code fragment you can determine the total. iTotal := 0 auData := oVirtualFieldColumn:DataList iCount := oVirtualFieldColumn:DataCount FOR iPos := 1 UPTO iCount iTotal += auData[iPos, BVFCD_VALUE] NEXT Regards, Joachim Bieler Am 23.08.2011 05:03, schrieb Grant: > I would like to total the values from a VirtualFieldColumn to display > at the end of a display but I don't know see how to do this. I have > tried the Sum() method by using the generic virtual value #expression > but that dosen't work so I have been looking for a sample with > something like this but so far been unsuccessful. Any help would be > appreciated. Thank you