Count Number of Records in a report

Hi All,

I would like generate a Excel report with only the total of the records without the record details.

For example, a form has Client name with the salesman serve the client. So it’s actually group by salesman and count the number of salesman.

How can I do it in the LotusScript?

Thank you.

Subject: Count Number of Records in a report

Make a view categorized by salesman.From the help-file:

Sub Click(Source As Button)

Dim ws As New NotesUIWorkspace

Dim uiview As NotesUIView

Dim view As NotesView

Dim nav As NotesViewNavigator

Dim entry As NotesViewEntry

Dim msg As String

Set uiview = ws.CurrentView

Set view = uiview.View

If view.EntryCount = 0 Then

Messagebox "No documents in view",, "View empty"

Else

Set nav = view.CreateViewNav

Set entry = nav.GetFirst

Do While Not(entry Is Nothing)

  msg = msg & entry.ColumnValues(0) & Chr(13)

  Set entry = nav.GetNextCategory(entry)

Loop

Messagebox msg,, "Categories"

End If

End Sub

Subject: RE: Count Number of Records in a report

Thanks Herbert.

How about if the sum of salesman need to be retrieved from different views?

We have Salesman Type A, Salesman Type B, C… etc, and each view categorized by each Salesman Type. And in the report, I would like to sum each of them, so how to sum from different views?

Thanks.

Subject: Count Number of Records in a report

Here is my case, in the form I have Client name, Salesman Type A, Salesman Type B, Salesman Type C.

And now I would like to count the number of Salesman Type A, B and C and display only the number in the report. How can I do this? What’s the best way?