NetTalk Central

Author Topic: NetWebForm Browse - Counting Records  (Read 3548 times)

rupertvz

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
    • Email
NetWebForm Browse - Counting Records
« on: September 12, 2011, 04:11:13 AM »
Hi Guys,

I want to be able to count the total records in a NetWebForm Browse procedure.

The Browse records are spread across pages, and therefore the browse template ONLY counts the records on the current page.

I would like to show a summary (example:  total number of records), on the next tab of the NetWebForm

Will appreciate some help.

Best Regards
Rupert

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: NetWebForm Browse - Counting Records
« Reply #1 on: September 12, 2011, 06:11:08 AM »
The easy way is to count the records in the table or view if filtered using std clarion syntax like Records(TableA). It gets a bit more complicated if the users uses a locator. You would need to intercept this value and do a new count based on the value.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetWebForm Browse - Counting Records
« Reply #2 on: September 12, 2011, 06:14:22 AM »
a) make a function to calculate the total.

b) set the total type to "custom" and in the Total field put a call to your function.

cheers
Bruce

rupertvz

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
    • Email
Re: NetWebForm Browse - Counting Records
« Reply #3 on: September 14, 2011, 01:22:13 PM »
Thanks Bruce,

a) I created a new function with a record-loop to calculate the total

b) I set the total type in the browse to "custom"

c) Do you mean I should put my function-name in the total-field?  How should it be called from here?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetWebForm Browse - Counting Records
« Reply #4 on: September 14, 2011, 10:27:01 PM »
>> Do you mean I should put my function-name in the total-field?

yes.

>> How should it be called from here?

as normal
functionname(parameters)

Cheers
Bruce